[Patch] Signal mask handling

Pierre A. Humblet pierre@phumblet.no-ip.org
Fri Mar 12 00:38:00 GMT 2004


At 12:48 AM 3/11/2004 -0500, Christopher Faylor wrote:
>I tried applying this patch and saw a difference in behavior with
>the attached program.  It wasn't setting the signal mask in the handler
>correctly.  I have changes in my sandbox which conflicted with your
>patch, so I probably misapplied something, though since your patch
>looks correct to me otherwise.
>
>Can you confirm the same behavior on the below program before and
>after your change?  If so, I'd say it's ok to check in but I'd like to
>check my changes in first.  I hope to have them completed soon.
>
>Btw, I think that if you check this in, set_process_mask becomes
>obsolete, right?

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.

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);
}

Pierre



More information about the Cygwin-patches mailing list