Lines Matching refs:pid
32 int pid = os_getpid(), ppid = getppid();
38 kill(pid, SIGKILL);
40 kill(pid, SIGSTOP);
48 if (sc_result == pid)
95 int pid, n, status;
99 pid = fork();
100 if (pid == 0)
102 else if (pid < 0)
105 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
112 return pid;
121 static int stop_ptraced_child(int pid, int exitcode, int mustexit)
125 if (ptrace(PTRACE_CONT, pid, 0, 0) < 0) {
129 CATCH_EINTR(n = waitpid(pid, &status, 0));
167 int pid, n, status, count=0;
171 pid = start_ptraced_child();
173 if (ptrace(PTRACE_SYSEMU, pid, 0, 0) < 0)
176 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
183 if (ptrace(PTRACE_GETREGS, pid, 0, regs) < 0)
191 n = ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_RET_OFFSET, os_getpid());
198 if (stop_ptraced_child(pid, 0, 0) < 0)
206 pid = start_ptraced_child();
208 if ((ptrace(PTRACE_OLDSETOPTIONS, pid, 0,
214 if (ptrace(PTRACE_SYSEMU_SINGLESTEP, pid, 0, 0) < 0)
216 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
227 n = ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_RET_OFFSET,
243 if (stop_ptraced_child(pid, 0, 0) < 0)
254 stop_ptraced_child(pid, 1, 0);
261 int pid, syscall, n, status;
264 pid = start_ptraced_child();
266 if ((ptrace(PTRACE_OLDSETOPTIONS, pid, 0,
271 if (ptrace(PTRACE_SYSCALL, pid, 0, 0) < 0)
274 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
283 syscall = ptrace(PTRACE_PEEKUSER, pid, PT_SYSCALL_NR_OFFSET,
286 n = ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_NR_OFFSET,
294 stop_ptraced_child(pid, 0, 1);
358 int pid;
370 pid = start_ptraced_child();
371 if (init_pid_registers(pid))
373 stop_ptraced_child(pid, 1, 1);