Lines Matching refs:pid
27 pid_t pid; member
228 pid_t pid; in final_run() local
234 if (x->action & ASKFIRST) pid = fork(); in final_run()
235 else pid = vfork(); in final_run()
237 if (pid > 0) { in final_run()
243 return pid; in final_run()
244 } else if (pid < 0) { in final_run()
272 static struct action_list_seed* mark_as_terminated_process(pid_t pid) in mark_as_terminated_process() argument
276 if (pid > 0) { in mark_as_terminated_process()
278 if (x->pid == pid) { in mark_as_terminated_process()
279 x->pid = 0; in mark_as_terminated_process()
288 static void waitforpid(pid_t pid) in waitforpid() argument
290 if (pid <= 0) return; in waitforpid()
301 pid_t pid; in run_action_from_list() local
307 pid = final_run(x); in run_action_from_list()
308 if (!pid) return; in run_action_from_list()
309 if (x->action & (SHUTDOWN|SYSINIT|CTRLALTDEL|WAIT)) waitforpid(pid); in run_action_from_list()
312 if (!(x->pid)) x->pid = final_run(x); in run_action_from_list()
337 pid_t pid; in halt_poweroff_reboot_handler() local
359 pid = vfork(); in halt_poweroff_reboot_handler()
361 if (pid == 0) { in halt_poweroff_reboot_handler()
372 pid_t pid; in restart_init_handler() local
387 pid = vfork(); in restart_init_handler()
389 if (pid == 0) { in restart_init_handler()
414 pid_t pid; in pause_handler() local
422 do pid = waitpid(-1,NULL,WNOHANG); while((pid==-1) && (errno=EINTR)); in pause_handler()
423 mark_as_terminated_process(pid); in pause_handler()
491 pid_t pid = waitpid(-1, NULL, suspected_WNOHANG); in init_main() local
493 if (pid <= 0) break; in init_main()
494 mark_as_terminated_process(pid); in init_main()