force_sig_info
The behavior of force_sig_info has changed in kernel 2.6 in a way that affects very badly our product - in case the user blocks a signal that must be delivered, the disposition of the signal is changed to SIG_DFL.
The product that my team is working on is a binary translator of 32 bit binaries for IPF platforms. We have hard time juggling between signals that are meant for the translated process and signals that are meant for the translator, but till now we managed to let the kernel handle the signal mask. The new behavior enforces us to handle the signal mask in the translator, which might have severe implications on performance. There was a mailing thread about this matter, so apparently, we're not the only ones who suffer from this change. There was even a patch that was proposed to make things easier for existing apps that break because of this change, but somehow, the thread was cut and I could not see the response to the proposed patch. Does anyone know the reasons why this patch did not make it upstream ?
Here is the patch -
=============================================================
signal.c renamed from signal.c.orig +2 -1
@@ -822,7 +822,8 @@ force_sig_info(int sig, struct siginfo *spin_lock_irqsave (&t->sighand->siglock, flags);if (sigismember (&t->blocked, sig) || t->sighand->action[sig-1 ].sa.sa_handler ==SIG_IGN ) { - t->sighand->action[sig-1 ].sa.sa_handler =SIG_DFL ; +if (t->sighand->action[sig-1 ].sa.sa_handler ==SIG_IGN ) + t->sighand->action[sig-1 ].sa.sa_handler =SIG_DFL ;sigdelset (&t->blocked, sig);recalc_sigpending_tsk (t); }
=============================================================
Thanks,
Yoav.
Yoav Zach
IA-32 Execution Layer
Performance Tools Lab
Intel Corp.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Quoted 5 lines · Yoav Zach
The behavior of
force_sig_infohas changed in kernel 2.6 in a way that affects very badly our product - in case the user blocks a signal that must be delivered, the disposition of the signal is changed toSIG_DFL.
This is very much by design, and it showed real bugs in programs. You can't block a signal and expect the kernel to still honor the signal handler you had installed. If you blocked it, you're saying "I'm not ready to take this signal". And that means that the kernel should refuse to deliver it to you.
Why are you blocking signals that you want to get? Sounds like a bug in your program.
Linus