Lines Matching defs:child
72 pid_t child;
81 child = fork();
82 if (child < 0) {
86 if (child == 0) {
93 /* Parent: wait for & check child's exit status. */
94 rc = waitpid(child, &status, 0);
95 if (rc != child) {
96 printf("[FAIL] (waitpid(%d,...) returned %d)\n", child, rc);
100 printf("[FAIL] (child %d did not exit cleanly, status=%08x)\n",
101 child, status);
106 printf("[FAIL] (child %d exited with %d not %d nor %d)\n",
107 child, WEXITSTATUS(status), expected_rc, expected_rc2);