Lines Matching refs:child_pid
46 static pid_t child_pid; variable
91 child_pid = SAFE_FORK(); in ptrace_try_kern_addr()
93 if (!child_pid) in ptrace_try_kern_addr()
96 if (SAFE_WAITPID(child_pid, &status, WUNTRACED) != child_pid) in ptrace_try_kern_addr()
100 SAFE_PTRACE(PTRACE_ATTACH, child_pid, NULL, NULL); in ptrace_try_kern_addr()
101 SAFE_PTRACE(PTRACE_POKEUSER, child_pid, in ptrace_try_kern_addr()
103 SAFE_PTRACE(PTRACE_POKEUSER, child_pid, in ptrace_try_kern_addr()
106 TEST(ptrace(PTRACE_POKEUSER, child_pid, in ptrace_try_kern_addr()
111 TEST(ptrace(PTRACE_POKEUSER, child_pid, in ptrace_try_kern_addr()
127 addr = ptrace(PTRACE_PEEKUSER, child_pid, in ptrace_try_kern_addr()
134 SAFE_PTRACE(PTRACE_DETACH, child_pid, NULL, NULL); in ptrace_try_kern_addr()
135 SAFE_KILL(child_pid, SIGCONT); in ptrace_try_kern_addr()
136 child_pid = 0; in ptrace_try_kern_addr()
150 if (child_pid) in cleanup()
151 SAFE_KILL(child_pid, SIGKILL); in cleanup()