Lines Matching refs:pid
27 pid_t pid;
191 if (!(*y)->pid) {
241 pid_t pid;
247 if (x->action & ASKFIRST) pid = fork();
248 else pid = vfork();
250 if (pid > 0) {
256 return pid;
257 } else if (pid < 0) {
285 static struct action_list_seed* mark_as_terminated_process(pid_t pid)
289 if (pid > 0) {
291 if (x->pid == pid) {
292 x->pid = 0;
301 static void waitforpid(pid_t pid)
303 if (pid <= 0) return;
305 while (!kill(pid, 0)) mark_as_terminated_process(wait(NULL));
310 pid_t pid;
316 pid = final_run(x);
317 if (!pid) return;
318 if (x->action & (SHUTDOWN|SYSINIT|CTRLALTDEL|WAIT)) waitforpid(pid);
321 if (!(x->pid)) x->pid = final_run(x);
346 pid_t pid;
368 pid = vfork();
370 if (pid == 0) {
381 pid_t pid;
396 pid = vfork();
398 if (pid == 0) {
423 pid_t pid;
431 do pid = waitpid(-1,NULL,WNOHANG); while((pid==-1) && (errno=EINTR));
432 mark_as_terminated_process(pid);
504 pid_t pid = waitpid(-1, NULL, suspected_WNOHANG);
506 if (pid <= 0) break;
507 mark_as_terminated_process(pid);