diff options
author | 2002-12-08 04:16:19 +0000 | |
---|---|---|
committer | 2002-12-08 04:16:19 +0000 | |
commit | 3f2812ba6128d39f66cd2e76b297e40db7ba5b17 (patch) | |
tree | 208a0ed0444cd36c72b7f8fc3859c96595cce367 /regress/lib/libpthread/fork | |
parent | remove unused data member from pthread_cond. (diff) | |
download | wireguard-openbsd-3f2812ba6128d39f66cd2e76b297e40db7ba5b17.tar.xz wireguard-openbsd-3f2812ba6128d39f66cd2e76b297e40db7ba5b17.zip |
comment out bogus portion of test until I figure
a better way to test the condition it is trying
to test. Solves malloc.conf -> J problem.
Diffstat (limited to 'regress/lib/libpthread/fork')
-rw-r--r-- | regress/lib/libpthread/fork/fork.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/regress/lib/libpthread/fork/fork.c b/regress/lib/libpthread/fork/fork.c index b560cf20fa8..3a5d9ac24cd 100644 --- a/regress/lib/libpthread/fork/fork.c +++ b/regress/lib/libpthread/fork/fork.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fork.c,v 1.2 2001/09/20 16:43:15 todd Exp $ */ +/* $OpenBSD: fork.c,v 1.3 2002/12/08 04:16:19 marc Exp $ */ /* * Copyright (c) 1993, 1994, 1995, 1996 by Chris Provenzano and contributors, * proven@mit.edu All rights reserved. @@ -99,8 +99,18 @@ main() ASSERT(getpid() != parent_pid); /* 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); |