Lines Matching refs:chld
84 static siginfo_t wait_trap(pid_t chld) in wait_trap() argument
87 if (waitid(P_PID, chld, &si, WEXITED|WSTOPPED) != 0) in wait_trap()
89 if (si.si_pid != chld) in wait_trap()
178 pid_t chld = fork(); in test_ptrace_syscall_restart() local
179 if (chld < 0) in test_ptrace_syscall_restart()
182 if (chld == 0) { in test_ptrace_syscall_restart()
198 if (waitpid(chld, &status, 0) != chld || !WIFSTOPPED(status)) in test_ptrace_syscall_restart()
204 if (ptrace(PTRACE_SYSEMU, chld, 0, 0) != 0) in test_ptrace_syscall_restart()
206 wait_trap(chld); in test_ptrace_syscall_restart()
208 if (ptrace(PTRACE_GETREGS, chld, 0, ®s) != 0) in test_ptrace_syscall_restart()
232 if (ptrace(PTRACE_SETREGS, chld, 0, ®s) != 0) in test_ptrace_syscall_restart()
235 if (ptrace(PTRACE_SYSEMU, chld, 0, 0) != 0) in test_ptrace_syscall_restart()
237 wait_trap(chld); in test_ptrace_syscall_restart()
239 if (ptrace(PTRACE_GETREGS, chld, 0, ®s) != 0) in test_ptrace_syscall_restart()
264 if (ptrace(PTRACE_SETREGS, chld, 0, ®s) != 0) in test_ptrace_syscall_restart()
267 if (ptrace(PTRACE_SYSEMU, chld, 0, 0) != 0) in test_ptrace_syscall_restart()
269 wait_trap(chld); in test_ptrace_syscall_restart()
271 if (ptrace(PTRACE_GETREGS, chld, 0, ®s) != 0) in test_ptrace_syscall_restart()
283 if (ptrace(PTRACE_CONT, chld, 0, 0) != 0) in test_ptrace_syscall_restart()
285 if (waitpid(chld, &status, 0) != chld) in test_ptrace_syscall_restart()
298 pid_t chld = fork(); in test_restart_under_ptrace() local
299 if (chld < 0) in test_restart_under_ptrace()
302 if (chld == 0) { in test_restart_under_ptrace()
319 if (waitpid(chld, &status, 0) != chld || !WIFSTOPPED(status)) in test_restart_under_ptrace()
325 if (ptrace(PTRACE_SYSCALL, chld, 0, 0) != 0) in test_restart_under_ptrace()
327 wait_trap(chld); in test_restart_under_ptrace()
331 if (ptrace(PTRACE_GETREGS, chld, 0, ®s) != 0) in test_restart_under_ptrace()
345 kill(chld, SIGUSR1); in test_restart_under_ptrace()
349 if (ptrace(PTRACE_SYSCALL, chld, 0, 0) != 0) in test_restart_under_ptrace()
351 wait_trap(chld); in test_restart_under_ptrace()
353 if (ptrace(PTRACE_GETREGS, chld, 0, ®s) != 0) in test_restart_under_ptrace()
368 if (ptrace(PTRACE_SETREGS, chld, 0, ®s) != 0) in test_restart_under_ptrace()
372 if (ptrace(PTRACE_CONT, chld, 0, 0) != 0) in test_restart_under_ptrace()
374 if (waitpid(chld, &status, 0) != chld) in test_restart_under_ptrace()
385 if (ptrace(PTRACE_SYSCALL, chld, 0, 0) != 0) in test_restart_under_ptrace()
387 wait_trap(chld); in test_restart_under_ptrace()
391 if (ptrace(PTRACE_GETREGS, chld, 0, ®s) != 0) in test_restart_under_ptrace()
405 kill(chld, SIGKILL); in test_restart_under_ptrace()
406 if (waitpid(chld, &status, 0) != chld) in test_restart_under_ptrace()