Lines Matching defs:pid
195 pid_t __attribute__((returns_twice)) xvforkwrap(pid_t pid)
197 if (pid == -1) perror_exit("vfork");
200 if (!pid) toys.stacktop = 0;
202 return pid;
226 // return: pid of child process
229 int cestnepasun[4], pid;
233 if (pipes) for (pid = 0; pid < 2; pid++) {
234 if (pipes[pid] != -1) continue;
235 if (pipe(cestnepasun+(2*pid))) perror_exit("pipe");
238 if (!(pid = CFG_TOYBOX_FORK ? xfork() : XVFORK())) {
309 return pid;
313 int xwaitpid(pid_t pid)
317 while (-1 == waitpid(pid, &status, 0) && errno == EINTR);
322 int xpclose_both(pid_t pid, int *pipes)
329 return xwaitpid(pid);
335 int pipes[2], pid;
339 pid = xpopen_both(argv, pipes);
340 *pipe = pid ? pipes[!!isstdout] : -1;
342 return pid;
345 int xpclose(pid_t pid, int pipe)
349 return xpclose_both(pid, 0);
780 // Open a /var/run/NAME.pid file, dying if we can't write it or if it currently
786 pid_t pid;
788 sprintf(pidfile, "/var/run/%s.pid", name);
801 pid = atoi(spid);
802 if (pid < 1 || (kill(pid, 0) && errno == ESRCH)) unlink(pidfile);