[PATCH suggestion] exceptions.cc, interrupt_setup ()

Pavel Tsekov ptsekov@gmx.net
Fri Aug 16 19:20:00 GMT 2002


Hello, there! :)

Someone might remember that the main reason for delaying the
Midnight Commander release for Cygwin so long was that there was a
problem with the subshell support. I was thinking that this was a
problem in Cygwin, but I wasn't able to track it down... until today.

This issue went to the mc-devel list and stalled there for some time
until recently Pavel Roskin offered his help to debug the problem.
Based on his finding
(http://mail.gnome.org/archives/mc-devel/2002-August/msg00062.html) I
was able to track down the problem in the cygwin signal handling code.

The problem is triggered by the sigdelayed0() code which always
restores the signal mask (exceptions.cc, line 1237) using
sigsave.oldmask. The real problem is that the sigsave.oldmask field
is never initialised when preparing to execute a signal handler.
So imagine that someone set sigsave.oldmask to some value (sigsuspend() in this case),
then you will always get this value as the signal mask after a signal handler is called.

I suggest the following very simple patch. Since I may have not
understand all the specifics of the signal handling mechanism I offer
it for discussion. Just for the record - this patch solves that
outstanding problem with MC.

Thanks!

Pavel Tsekov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exceptions.cc.diff
Type: application/octet-stream
Size: 588 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20020816/3ebea9da/attachment.obj>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list