diff options
| author | John Birrell <jb@FreeBSD.org> | 1998-06-17 03:53:16 +0000 |
|---|---|---|
| committer | John Birrell <jb@FreeBSD.org> | 1998-06-17 03:53:16 +0000 |
| commit | d989fc8faa2cd86dd8f5a7bed0cc3e1ab6a9ec06 (patch) | |
| tree | d25e420f93c1fd831db0a1946a6d4c56e2da30fa /lib/libpthread/thread/thr_sig.c | |
| parent | c12b78678271d97425b4691dc939a1ac86375567 (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_sig.c')
| -rw-r--r-- | lib/libpthread/thread/thr_sig.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/lib/libpthread/thread/thr_sig.c b/lib/libpthread/thread/thr_sig.c index 1b1542e61bb7..cb323e786500 100644 --- a/lib/libpthread/thread/thr_sig.c +++ b/lib/libpthread/thread/thr_sig.c @@ -264,6 +264,26 @@ _thread_signal(pthread_t pthread, int sig) break; /* + * The wait state is a special case due to the handling of + * SIGCHLD signals. + */ + case PS_WAIT_WAIT: + /* + * Check for signals other than the death of a child + * process: + */ + if (sig != SIGCHLD) + /* Flag the operation as interrupted: */ + pthread->interrupted = 1; + + /* Change the state of the thread to run: */ + PTHREAD_NEW_STATE(pthread,PS_RUNNING); + + /* Return the signal number: */ + pthread->signo = sig; + break; + + /* * States that are interrupted by the occurrence of a signal * other than the scheduling alarm: */ @@ -271,7 +291,6 @@ _thread_signal(pthread_t pthread, int sig) case PS_FDW_WAIT: case PS_SLEEP_WAIT: case PS_SIGWAIT: - case PS_WAIT_WAIT: case PS_SELECT_WAIT: /* Flag the operation as interrupted: */ pthread->interrupted = 1; |
