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.
This commit is contained in:
David Xu 2006-10-14 13:40:08 +00:00
parent f51bf07af8
commit 5656b5fafa

View File

@ -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.