summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2017-07-29 16:53:39 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2017-07-29 16:53:39 +0000
commit0de27e22fa609cd6e12e65eb233dbfa07e5d65ba (patch)
treef83649452f3cbf8cd6aa68dc9c8936497d52f4d4 /regress
parent019a00c112033e13ce96592d79c530cd88057787 (diff)
repair regress for more aggressive post fork checking in library.
we should not be checking that things explicitly forbidden work. prompted by bluhm
Diffstat (limited to 'regress')
-rw-r--r--regress/lib/libpthread/fork/fork.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/regress/lib/libpthread/fork/fork.c b/regress/lib/libpthread/fork/fork.c
index 170dfe432ec..3c15b41866a 100644
--- a/regress/lib/libpthread/fork/fork.c
+++ b/regress/lib/libpthread/fork/fork.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fork.c,v 1.4 2003/07/31 21:48:04 deraadt Exp $ */
+/* $OpenBSD: fork.c,v 1.5 2017/07/29 16:53:38 tedu Exp $ */
/*
* Copyright (c) 1993, 1994, 1995, 1996 by Chris Provenzano and contributors,
* proven@mit.edu All rights reserved.
@@ -100,23 +100,6 @@ main(int argc, char *argv[])
/* Our sleeper thread should have disappeared */
printf("sleeper should have disappeared\n");
- /*
- * The following is bogus. The sleeper thread was
- * freed before the fork returned. Calling pthread_join
- * dereferences the 'sleeper_thread' pointer which no
- * longer points to a valid thread structure. If the
- * function returns ESRCH it's only because the freed
- * memory hasn't been reused yet.
- ASSERT(ESRCH == pthread_join(sleeper_thread, &result));
- printf("sleeper disappeared correctly\n");
- */
-
- /* Test starting another thread */
- CHECKr(pthread_create(&sleeper_thread, NULL, empty, NULL));
- sleep(1);
- CHECKr(pthread_join(sleeper_thread, &result));
- ASSERT(result == (void *)0x12345678);
- printf("child ok\n");
_exit(0);
PANIC("child _exit");
}