Lines Matching defs:child
33 pid_t child, wpid;
39 SYSCALL_REQUIRE((child = fork()) != -1);
40 if (child == 0) {
41 DPRINTF("Before calling PT_TRACE_ME from child %d\n", getpid());
44 DPRINTF("Before raising %s from child\n", strsignal(sigval));
49 "Child should be terminated by a signal from its parent");
51 DPRINTF("Parent process PID=%d, child's PID=%d\n", getpid(), child);
53 DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME);
54 TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
58 DPRINTF("Before killing the child process with %s\n", type);
60 SYSCALL_REQUIRE(ptrace(PT_KILL, child, (void*)1, 0) != -1);
62 kill(child, SIGKILL);
64 setpgid(child, 0);
65 killpg(getpgid(child), SIGKILL);
68 DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME);
69 TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
73 DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME);
74 TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
82 "Verify killing the child with " type); \