Skip to contentSkip to conversation

Better method of getting rid of signals

pm Pavel Machek 1 participant 1 message Oct 10, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi!

recalc_sigpending() seems like better idea, since it does not have potential to kill some signal. Now with proper locking. Please apply,

Pavel

kernel/power/process.c renamed from linux/kernel/power/process.c +5 -4
@@ -49,10 +49,11 @@
 	pr_debug("%s entered refrigerator\n", current->comm);
 	printk("=");
 	current->flags &= ~PF_FREEZE;
-	if (flag)
-		flush_signals(current); /* We have signaled a kernel thread, which isn't normal behaviour
-					   and that may lead to 100%CPU sucking because those threads
-					   just don't manage signals. */
+
+	spin_lock_irq(&current->sighand->siglock);
+	recalc_sigpending(); /* We sent fake signal, clean it up */
+	spin_unlock_irq(&current->sighand->siglock);
+
 	current->flags |= PF_FROZEN;
 	while (current->flags & PF_FROZEN)
 		schedule();
Signature · 2 lines
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]