this should fix Axel Zeuner's sigwait() testcase.
Ingo
--- linux/include/linux/sched.h.orig Wed Oct 2 18:10:24 2002
+++ linux/include/linux/sched.h Wed Oct 2 18:12:14 2002
@@ -430,6 +430,7 @@
#define PF_FROZEN 0x00040000 /* frozen for system suspend */
#define PF_SYNC 0x00080000 /* performing fsync(), etc */
#define PF_FSTRANS 0x00100000 /* inside a filesystem transaction */
+#define PF_SIGWAIT 0x00200000 /* inside sigwait */
/*
* Ptrace flags
--- linux/kernel/signal.c.orig Wed Oct 2 18:08:39 2002
+++ linux/kernel/signal.c Wed Oct 2 18:14:05 2002
@@ -886,6 +886,10 @@
ret = specific_send_sig_info(sig, info, p, 1);
goto out_unlock;
}
+ if (t->flags & PF_SIGWAIT) {
+ ret = specific_send_sig_info(sig, info, t, 0);
+ goto out_unlock;
+ }
if (sig_kernel_broadcast(sig) || sig_kernel_coredump(sig)) {
ret = __broadcast_thread_group(p, sig);
goto out_unlock;
@@ -1485,12 +1489,14 @@
sigandsets(¤t->blocked, ¤t->blocked, &these);
recalc_sigpending();
+ current->flags |= PF_SIGWAIT;
spin_unlock_irq(¤t->sig->siglock);
current->state = TASK_INTERRUPTIBLE;
timeout = schedule_timeout(timeout);
spin_lock_irq(¤t->sig->siglock);
+ current->flags &= ~PF_SIGWAIT;
sig = dequeue_signal(¤t->sig->shared_pending, &these, &info);
if (!sig)
sig = dequeue_signal(¤t->pending, &these, &info);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/