Lines Matching refs:pid
8 * waitpid(pid, WNOHANG) should return 0 if there is a running child
10 * waitpid(pid, WNOHANG) should return the pid of the child if
28 static void cleanup_pid(pid_t pid)
30 if (pid > 0) {
31 kill(pid, SIGKILL);
32 waitpid(pid, NULL, 0);
38 pid_t pid, ret;
41 pid = SAFE_FORK();
42 if (pid == 0) {
49 ret = waitpid(pid, &status, WNOHANG);
59 cleanup_pid(pid);
64 SAFE_WAITPID(pid, NULL, 0);
66 tst_res(TPASS, "waitpid(pid, WNOHANG) = 0 for a running child");
71 pid_t pid, ret;
74 pid = SAFE_FORK();
75 if (pid == 0)
79 ret = waitpid(pid, &status, WNOHANG);
86 if (ret == pid)
90 ret, pid);
91 cleanup_pid(pid);
106 tst_res(TPASS, "waitpid(pid, WNOHANG) = pid for an exited child");