Lines Matching full:pid
89 do_wait4(pid_t pid, int *wstatus, int options, struct rusage *ru) in do_wait4() argument
95 pid_t rc = wait4(pid, wstatus, options, ru); in do_wait4()
109 pid_t pid; in main() local
110 pid = fork(); in main()
111 if (pid < 0) in main()
114 if (!pid) { in main()
124 if (wait4(pid, s, WNOHANG|__WALL, NULL)) in main()
126 tprintf("wait4(%d, %p, WNOHANG|__WALL, NULL) = 0\n", pid, s); in main()
129 if (wait4(pid, s, WNOHANG|__WALL, rusage)) in main()
131 tprintf("wait4(%d, %p, WNOHANG|__WALL, %p) = 0\n", pid, s, rusage); in main()
136 assert(do_wait4(pid, s, 0, rusage) == pid); in main()
139 " = %d\n", pid, sprint_rusage(rusage), pid); in main()
141 pid = fork(); in main()
142 if (pid < 0) in main()
145 if (!pid) { in main()
150 assert(do_wait4(pid, s, __WALL, rusage) == pid); in main()
153 ", __WALL, %s) = %d\n", pid, sprint_rusage(rusage), pid); in main()
157 pid = fork(); in main()
158 if (pid < 0) in main()
161 if (!pid) { in main()
171 assert(do_wait4(pid, s, WSTOPPED, rusage) == pid); in main()
174 ", WSTOPPED, %s) = %d\n", pid, sprint_rusage(rusage), pid); in main()
176 if (kill(pid, SIGCONT)) in main()
180 assert(do_wait4(pid, s, WCONTINUED, rusage) == pid); in main()
183 ", %s) = %d\n", pid, sprint_rusage(rusage), pid); in main()
189 assert(do_wait4(pid, s, 0, rusage) == pid); in main()
192 ", %s) = %d\n", pid, sprint_rusage(rusage), pid); in main()