Lines Matching defs:testpid
352 static void mess_with_syscall(pid_t testpid, enum ptrace_pass pass)
362 ptrace(PTRACE_GETREGS, testpid, NULL, ®s);
393 ptrace(PTRACE_SETREGS, testpid, NULL, ®s);
396 static void syscall_numbering_tracer(pid_t testpid)
401 pid_t wpid = waitpid(testpid, &wstatus, 0);
404 if (wpid != testpid)
410 mess_with_syscall(testpid, sh->ptrace_pass);
412 !ptrace(PTRACE_SYSCALL, testpid, NULL, NULL));
414 ptrace(PTRACE_DETACH, testpid, NULL, NULL);
417 while (waitpid(testpid, &wstatus, 0) != testpid || !WIFEXITED(wstatus))
423 pid_t testpid;
426 testpid = fork();
428 if (testpid < 0) {
430 } else if (testpid == 0) {
434 syscall_numbering_tracer(testpid);