Call _exit(2) rather than exit(3) in forked child.

_exit(2) is async-signal-safe, whereas exit(3) is not.
This commit is contained in:
Jason Evans 2016-11-02 18:05:19 -07:00
parent 07ee4c5ff4
commit 31db315f17

View File

@ -26,7 +26,7 @@ TEST_BEGIN(test_fork)
test_fail("Unexpected fork() failure");
} else if (pid == 0) {
/* Child. */
exit(0);
_exit(0);
} else {
int status;