From 5656b5fafa801018bf627ab9768aa3c2c3b40b01 Mon Sep 17 00:00:00 2001 From: David Xu Date: Sat, 14 Oct 2006 13:40:08 +0000 Subject: [PATCH] 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. --- lib/libthr/thread/thr_fork.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libthr/thread/thr_fork.c b/lib/libthr/thread/thr_fork.c index d6222599063..cb487d41ba0 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.