]> git.neil.brown.name Git - history.git/commitdiff
If we set TIF_SIGPENDING for SIGCONT, we have to wake up any sleeping
authorLinus Torvalds <torvalds@home.transmeta.com>
Tue, 11 Feb 2003 03:05:34 +0000 (19:05 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Tue, 11 Feb 2003 03:05:34 +0000 (19:05 -0800)
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.

kernel/signal.c

index a4d6618f77d06785f5cde986c28c4dfb0a722c44..b43102e63a8d54858c9e31a75fe75ade35bd8847 100644 (file)
@@ -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);