Lines Matching refs:pid
49 pid_t pid;
54 pid = fork();
55 if (pid == 0) {
67 ptrace(PT_ATTACH, pid, (caddr_t) 0, 0);
71 wait4(pid, &status, 0, NULL);
75 ptrace(PT_DETACH, pid, (caddr_t) 1, 0);
81 kill(pid, SIGINT);
98 pid_t pid;
103 pid = fork();
104 if (pid == 0) {
112 ptrace(PT_ATTACH, pid, (caddr_t) 0, 0);
113 wait4(pid, &status, 0, NULL);
118 ptrace(PT_CONTINUE, pid, (caddr_t) 1, 0);
122 kill(pid, SIGINT);
126 wait4(pid, &status, 0, NULL);