diff options
Diffstat (limited to 'lib/libc_r/uthread/uthread_sig.c')
-rw-r--r-- | lib/libc_r/uthread/uthread_sig.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/libc_r/uthread/uthread_sig.c b/lib/libc_r/uthread/uthread_sig.c index cb323e7..316b78e 100644 --- a/lib/libc_r/uthread/uthread_sig.c +++ b/lib/libc_r/uthread/uthread_sig.c @@ -292,14 +292,17 @@ _thread_signal(pthread_t pthread, int sig) case PS_SLEEP_WAIT: case PS_SIGWAIT: case PS_SELECT_WAIT: - /* Flag the operation as interrupted: */ - pthread->interrupted = 1; + if (sig != SIGCHLD || + _thread_sigact[sig - 1].sa_handler != SIG_DFL) { + /* Flag the operation as interrupted: */ + pthread->interrupted = 1; - /* Change the state of the thread to run: */ - PTHREAD_NEW_STATE(pthread,PS_RUNNING); + /* Change the state of the thread to run: */ + PTHREAD_NEW_STATE(pthread,PS_RUNNING); - /* Return the signal number: */ - pthread->signo = sig; + /* Return the signal number: */ + pthread->signo = sig; + } break; } } |