This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: [Patch] Signal mask handling
On Thu, Mar 11, 2004 at 07:36:41PM -0500, Pierre A. Humblet wrote:
>There was a problem: pause() calls handle_sigsuspend(), which overwrites
>the oldmask set by _cygtls::interrupt_setup. It's all fixed, and I have
>renamed newmask to deltamask in cygtls.h. I can send you a fresh patch
>(everything, against cvs) now, or wait until you apply yours.
Go ahead and send the patch.
Btw, I removed the setting of oldmask in _cygtls::fixup_after_fork after
I searched for oldmask last night after seeing your patch.
>BTW I noticed that Posix and Cygwin diverge on sigpause.
>
>Posix:
>int sigpause(int sig);
>The sigpause() function removes sig from the calling process' signal
>mask and suspends the calling process until a signal is received. The
>sigpause() function restores the process' signal mask to its original
>state before returning.
>
>Cygwin
>sigpause (int signal_mask)
>{
> return handle_sigsuspend ((sigset_t) signal_mask);
>}
Sorry, but I don't see any divergence. A reading of the above might
seem to indicate that sigpause should return on the receipt of any
signal but I notice that on linux (and one other UNIX that I tested this
on) sigpause only returns on the receipt of a signal that has a handler
associated with it. This makes sigpause equivalent to sigsuspend,
AFAICT.
cgf