Lines Matching defs:childpid
89 int childpid = fork();
90 assert_condition(childpid >=0, -1, "fork failed");
92 if (childpid == 0){ /* child */
121 printf("parent: attaching to child with pid %d \n", childpid);
122 retval = ptrace(PT_ATTACH, childpid, NULL, 0);
126 retval = ptrace(PT_STEP, childpid, (caddr_t)1, 0);
129 retval = ptrace(PT_STEP, childpid, (caddr_t)1, 0);
133 retval = ptrace(PT_KILL, childpid, NULL, 0);
137 waitpid(childpid,&status,0);
152 int childpid = fork();
153 assert_condition(childpid >=0, -1, "fork failed");
155 if (childpid == 0){ /* child */
186 printf("parent: attaching to child with pid %d \n", childpid);
187 retval = ptrace(PT_ATTACH, childpid, NULL, 0);
191 retval = ptrace(PT_CONTINUE, childpid, (caddr_t)1, 0);
197 retval = kill(childpid, SIGSTOP);
202 retval = ptrace(PT_DETACH, childpid, NULL, 0);
207 waitpid(childpid,&status,0);
225 int childpid = fork();
227 assert_condition(childpid >=0, -4, "fork failed");
229 if (childpid == 0){
261 retval = ptrace(PT_SIGEXC, childpid, NULL, 0);
269 waitpid(childpid, &status, 0);