Lines Matching refs:childpid
56 pid_t childpid; variable
63 if (0 < childpid) { in cleanup()
66 if (kill(childpid, 0) == 0 || errno == ESRCH) { in cleanup()
69 (void)kill(childpid, 15); in cleanup()
72 if (waitpid(childpid, &status, WNOHANG) < 0) { in cleanup()
74 "waitpid(%d, ...) failed", childpid); in cleanup()
86 void parent(int masterfd, int childpid) in parent() argument
146 while (waitpid(childpid, &status, WNOHANG) < 0 && errno != ESRCH) ; in parent()
211 pid_t childpid; in main() local
226 childpid = fork(); in main()
227 if (childpid == -1) in main()
229 else if (childpid == 0) in main()
232 parent(masterfd, childpid); in main()