summaryrefslogtreecommitdiffstats
path: root/contrib/netbsd-tests/lib/libpthread/t_fork.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/netbsd-tests/lib/libpthread/t_fork.c')
-rw-r--r--contrib/netbsd-tests/lib/libpthread/t_fork.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/contrib/netbsd-tests/lib/libpthread/t_fork.c b/contrib/netbsd-tests/lib/libpthread/t_fork.c
index a58c1a6..936c7de 100644
--- a/contrib/netbsd-tests/lib/libpthread/t_fork.c
+++ b/contrib/netbsd-tests/lib/libpthread/t_fork.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_fork.c,v 1.1 2010/07/16 15:42:53 jmmv Exp $ */
+/* $NetBSD: t_fork.c,v 1.2 2017/01/16 16:28:27 christos Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_fork.c,v 1.1 2010/07/16 15:42:53 jmmv Exp $");
+__RCSID("$NetBSD: t_fork.c,v 1.2 2017/01/16 16:28:27 christos Exp $");
/*
* Written by Love Hörnquist Åstrand <lha@NetBSD.org>, March 2003.
@@ -61,11 +61,7 @@ print_pid(void *arg)
thread_survived = 1;
if (parent != getpid()) {
-#ifdef __FreeBSD__
_exit(1);
-#else
- exit(1);
-#endif
}
return NULL;
}
@@ -99,11 +95,7 @@ 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