summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2006-10-14 13:40:08 +0000
committerdavidxu <davidxu@FreeBSD.org>2006-10-14 13:40:08 +0000
commite8a2970aaf63dc792fbf353f4f8da07fd3c142e2 (patch)
tree925b134818a3c663291419de374396e6e3615b2e
parente7d9ab08978136ae53298ee700121a023f30501c (diff)
downloadFreeBSD-src-e8a2970aaf63dc792fbf353f4f8da07fd3c142e2.zip
FreeBSD-src-e8a2970aaf63dc792fbf353f4f8da07fd3c142e2.tar.gz
Don't inherit THR_FLAGS_NEED_SUSPEND for child process, child process
only has one thread, setting the flag can cause the thread to be suspended and no another thread will resume it.
-rw-r--r--lib/libthr/thread/thr_fork.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_fork.c b/lib/libthr/thread/thr_fork.c
index d622259..cb487d4 100644
--- a/lib/libthr/thread/thr_fork.c
+++ b/lib/libthr/thread/thr_fork.c
@@ -144,6 +144,8 @@ _fork(void)
/* Child process */
errsave = errno;
curthread->cancelflags &= ~THR_CANCEL_NEEDED;
+ curthread->flags &= ~THR_FLAGS_NEED_SUSPEND;
+
/*
* Thread list will be reinitialized, and later we call
* _libpthread_init(), it will add us back to list.
OpenPOWER on IntegriCloud