summaryrefslogtreecommitdiff
path: root/lib/libpthread/thread/thr_sig.c
diff options
context:
space:
mode:
authorJohn Birrell <jb@FreeBSD.org>1998-05-31 23:46:01 +0000
committerJohn Birrell <jb@FreeBSD.org>1998-05-31 23:46:01 +0000
commitd972680a31910d8ebd5f437c7b5b4aabcca6e385 (patch)
tree11c325bece26b0c4f486ea337275a8e1490927aa /lib/libpthread/thread/thr_sig.c
parent9e74704eb2e6795eb6a53b12efa86e9ab6030f13 (diff)
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_sig.c')
-rw-r--r--lib/libpthread/thread/thr_sig.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libpthread/thread/thr_sig.c b/lib/libpthread/thread/thr_sig.c
index 1e5ee630ce4b..3fa3c5655c19 100644
--- a/lib/libpthread/thread/thr_sig.c
+++ b/lib/libpthread/thread/thr_sig.c
@@ -242,8 +242,13 @@ _thread_signal(pthread_t pthread, int sig)
*/
sigaddset(&pthread->sigpend,sig);
+ /* Check if the thread is waiting on a child process: */
+ if (sig == SIGCHLD && pthread->state == PS_WAIT_WAIT) {
+ /* Change the state of the thread to run: */
+ PTHREAD_NEW_STATE(pthread,PS_RUNNING);
+
/* Check if system calls are not restarted: */
- if ((_thread_sigact[sig - 1].sa_flags & SA_RESTART) == 0) {
+ } else if ((_thread_sigact[sig - 1].sa_flags & SA_RESTART) == 0) {
/*
* Process according to thread state:
*/