Lines Matching refs:chld
41 static void wait_trap(pid_t chld) in wait_trap() argument
45 if (waitid(P_PID, chld, &si, WEXITED|WSTOPPED) != 0) in wait_trap()
47 if (si.si_pid != chld) in wait_trap()
57 pid_t chld; in test_ptrace_syscall_restart() local
61 chld = fork(); in test_ptrace_syscall_restart()
62 if (chld < 0) in test_ptrace_syscall_restart()
73 if (chld == 0) { in test_ptrace_syscall_restart()
88 if (waitpid(chld, &status, 0) != chld || !WIFSTOPPED(status)) in test_ptrace_syscall_restart()
92 if (ptrace(PTRACE_SYSEMU, chld, 0, 0) != 0) in test_ptrace_syscall_restart()
94 wait_trap(chld); in test_ptrace_syscall_restart()
96 if (ptrace(PTRACE_GETREGS, chld, 0, ®s) != 0) in test_ptrace_syscall_restart()
127 if (ptrace(PTRACE_SETREGS, chld, 0, ®s) != 0) in test_ptrace_syscall_restart()
130 if (ptrace(PTRACE_SYSEMU, chld, 0, 0) != 0) in test_ptrace_syscall_restart()
132 wait_trap(chld); in test_ptrace_syscall_restart()
134 if (ptrace(PTRACE_GETREGS, chld, 0, ®s) != 0) in test_ptrace_syscall_restart()
170 if (ptrace(PTRACE_SETREGS, chld, 0, ®s) != 0) in test_ptrace_syscall_restart()
173 if (ptrace(PTRACE_SYSEMU, chld, 0, 0) != 0) in test_ptrace_syscall_restart()
175 wait_trap(chld); in test_ptrace_syscall_restart()
177 if (ptrace(PTRACE_GETREGS, chld, 0, ®s) != 0) in test_ptrace_syscall_restart()
203 if (ptrace(PTRACE_CONT, chld, 0, 0) != 0) in test_ptrace_syscall_restart()
206 if (waitpid(chld, &status, 0) != chld) in test_ptrace_syscall_restart()