summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.transmeta.com>2003-02-10 19:05:34 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2003-02-10 19:05:34 -0800
commit83586a3d2e6b9eb24cce5b9ac20d81e1aff17370 (patch)
tree1844e5e06aaff39fd81616b48cf10ee5cd36f3cf
parent7b8886d32fda0f949e623ec58b79dd5bf43bda85 (diff)
If we set TIF_SIGPENDING for SIGCONT, we have to wake up any sleeping
tasks (even if we don't otherwise need to wake anything up), since otherwise later signals would see that signals are already pending and wouldn't cause wakeups.
-rw-r--r--kernel/signal.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index a4d6618f77d0..b43102e63a8d 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -619,6 +619,7 @@ static void handle_stop_signal(int sig, struct task_struct *p)
rm_from_queue(SIG_KERNEL_STOP_MASK, &p->signal->shared_pending);
t = p;
do {
+ unsigned int state;
rm_from_queue(SIG_KERNEL_STOP_MASK, &t->pending);
/*
@@ -635,9 +636,12 @@ static void handle_stop_signal(int sig, struct task_struct *p)
* Wake up the stopped thread _after_ setting
* TIF_SIGPENDING
*/
- if (!sigismember(&t->blocked, SIGCONT))
+ state = TASK_STOPPED;
+ if (!sigismember(&t->blocked, SIGCONT)) {
set_tsk_thread_flag(t, TIF_SIGPENDING);
- wake_up_state(t, TASK_STOPPED);
+ state |= TASK_INTERRUPTIBLE;
+ }
+ wake_up_state(t, state);
t = next_thread(t);
} while (t != p);