This is the mail archive of the cygwin-patches@cygwin.com 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]

Re: Signal handling tune up.


On Tue, Aug 19, 2003 at 09:23:57PM -0400, Pierre A. Humblet wrote:
>At 08:50 PM 8/19/2003 -0400, Christopher Faylor wrote:
>>On Tue, Aug 19, 2003 at 08:41:35PM -0400, Christopher Faylor wrote:
>>>However, it has been bothering me for a long time that all of this
>>>signal mask stuff is in the pinfo structure.  This is a holdover from
>>>early cygwin that doesn't make any sense.  So, sometime soon, I'm
>>>going to rip much of the signal handling out of pinfo and put it
>>>into local arrays.
>
>OK.

FWIW, I probably wasted a full day trying to get myself-> information
into the asm.  Who knows?  Maybe it works now.  I don't know if I've
tried this with gcc 3.2 or if it stopped working with 3.2.

>>Actually, just to clarify, you do have to save siga's mask away
>>somewhere since there could be a race otherwise.
>
>Good point. But siga = myself->getsig (sig) so it can be calculated
>on the fly.
>Or do you mean that the program could change the sigaction mask
>in midstream? That would be unsafe programming.

I'm saying that you want to use the signal's mask when the program gets
the signal, not the signal's mask from when the program finally gets
around to calling the signal handler.

Although, hmm.  My brain hurts.  Maybe the latter behavior is more
correct since if something is in the middle of changing the mask it will
be guaranteed to be correct when the signal handler is finally called.


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