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:
parent
f51bf07af8
commit
5656b5fafa
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user