This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH suggestion], interrupt_setup ()

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
( 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 (, 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.


Pavel Tsekov

Description: Binary data

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]