Lines Matching refs:chld
82 static siginfo_t wait_trap(pid_t chld) in wait_trap() argument
85 if (waitid(P_PID, chld, &si, WEXITED|WSTOPPED) != 0) in wait_trap()
87 if (si.si_pid != chld) in wait_trap()
165 pid_t chld = fork(); in test_ptrace_syscall_restart() local
166 if (chld < 0) in test_ptrace_syscall_restart()
169 if (chld == 0) { in test_ptrace_syscall_restart()
183 if (waitpid(chld, &status, 0) != chld || !WIFSTOPPED(status)) in test_ptrace_syscall_restart()
189 if (ptrace(PTRACE_SYSEMU, chld, 0, 0) != 0) in test_ptrace_syscall_restart()
191 wait_trap(chld); in test_ptrace_syscall_restart()
193 if (ptrace(PTRACE_GETREGS, chld, 0, ®s) != 0) in test_ptrace_syscall_restart()
217 if (ptrace(PTRACE_SETREGS, chld, 0, ®s) != 0) in test_ptrace_syscall_restart()
220 if (ptrace(PTRACE_SYSEMU, chld, 0, 0) != 0) in test_ptrace_syscall_restart()
222 wait_trap(chld); in test_ptrace_syscall_restart()
224 if (ptrace(PTRACE_GETREGS, chld, 0, ®s) != 0) in test_ptrace_syscall_restart()
249 if (ptrace(PTRACE_SETREGS, chld, 0, ®s) != 0) in test_ptrace_syscall_restart()
252 if (ptrace(PTRACE_SYSEMU, chld, 0, 0) != 0) in test_ptrace_syscall_restart()
254 wait_trap(chld); in test_ptrace_syscall_restart()
256 if (ptrace(PTRACE_GETREGS, chld, 0, ®s) != 0) in test_ptrace_syscall_restart()
268 if (ptrace(PTRACE_CONT, chld, 0, 0) != 0) in test_ptrace_syscall_restart()
270 if (waitpid(chld, &status, 0) != chld) in test_ptrace_syscall_restart()