Author: ngie Date: Sun Nov 16 05:05:18 2014 New Revision: 274571 URL: https://svnweb.freebsd.org/changeset/base/274571
Log: Use _exit instead of exit so the file descriptors aren't flushed twice in the child processes Submitted by: pho Modified: head/contrib/netbsd-tests/lib/libpthread/t_fork.c Modified: head/contrib/netbsd-tests/lib/libpthread/t_fork.c ============================================================================== --- head/contrib/netbsd-tests/lib/libpthread/t_fork.c Sun Nov 16 04:13:44 2014 (r274570) +++ head/contrib/netbsd-tests/lib/libpthread/t_fork.c Sun Nov 16 05:05:18 2014 (r274571) @@ -61,7 +61,11 @@ print_pid(void *arg) thread_survived = 1; if (parent != getpid()) { +#ifdef __FreeBSD__ + _exit(1); +#else exit(1); +#endif } return NULL; } @@ -95,7 +99,11 @@ ATF_TC_BODY(fork, tc) ATF_REQUIRE_EQ_MSG(WEXITSTATUS(status), 0, "thread survived in child"); } else { sleep(5); +#ifdef __FreeBSD__ + _exit(thread_survived ? 1 : 0); +#else exit(thread_survived ? 1 : 0); +#endif } } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"