Lines Matching defs:pid

96 static char pidfilename[MAXPATHLEN]; /* name of pid file */
97 static char linkpidfile[MAXPATHLEN]; /* name of linkname pid file */
201 pid_t pid;
931 * Delete pid file before disestablishing ppp. Otherwise it
933 * we delete its pid file.
938 warn("unable to delete pid file %s: %m", pidfilename);
993 warn("unable to delete pid file %s: %m", pidfilename);
1141 create_pidfile(); /* write pid to file */
1152 pid_t pid;
1157 if ((pid = fork()) == (pid_t)-1) {
1161 if (pid != (pid_t)0) {
1164 (void) relock(pid);
1172 if ((pid = fork()) == (pid_t)-1) {
1176 if (pid != (pid_t)0) {
1179 (void) relock(pid);
1189 /* update pid files if they have been written already */
1220 (void) slprintf(pidfilename, sizeof(pidfilename), "%s%s.pid",
1226 error("Failed to create pid file %s: %m", pidfilename);
1239 (void) slprintf(linkpidfile, sizeof(linkpidfile), "%sppp-%s.pid",
1247 error("Failed to create pid file %s: %m", linkpidfile);
1514 warn("unable to delete pid file %s: %m", pidfilename);
1517 warn("unable to delete pid file %s: %m", linkpidfile);
1896 pid_t pid;
1908 pid = fork();
1910 if (pid == (pid_t)-1) {
1916 if (pid == (pid_t)0) {
1987 dbglog("%s option: '%s' started (pid %d)", optname, program, pid);
1989 record_child(pid, program, NULL, NULL);
1996 while (waitpid(pid, &status, 0) < 0) {
2028 pid_t pid;
2053 pid = fork();
2054 if (pid == (pid_t)-1) {
2058 if (pid == (pid_t)0) {
2113 dbglog("Script %s started (pid %d)", prog, pid);
2114 record_child(pid, prog, done, arg);
2116 return (pid);
2125 record_child(pid, prog, done, arg)
2126 pid_t pid;
2139 chp->pid = pid;
2157 pid_t pid;
2167 pid = waitpid(-1, &status, (waitfor ? 0 : WNOHANG));
2168 if (pid == 0) {
2170 } else if (pid == -1) {
2179 if (chp->pid == pid) {
2187 warn("Child process %s (pid %d) %s with signal %d (%s)",
2188 (chp != NULL ? chp->prog : "??"), pid,
2192 dbglog("Child process %s finished (pid %d), status = %d",
2193 (chp != NULL ? chp->prog: "??"), pid,
2218 (void) kill(chp->pid, runcount == 0 ? SIGTERM : SIGKILL);
2239 dbglog(" pid %d: %s", chp->pid, chp->prog);