summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--contrib/netbsd-tests/lib/libpthread/t_fork.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/lib/libpthread/t_fork.c b/contrib/netbsd-tests/lib/libpthread/t_fork.c
index ab8806d..a58c1a6 100644
--- a/contrib/netbsd-tests/lib/libpthread/t_fork.c
+++ b/contrib/netbsd-tests/lib/libpthread/t_fork.c
@@ -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
}
}
OpenPOWER on IntegriCloud