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: [Patch] Signal mask handling


OK, will do that tonight. Let me say that what motivated me
is that I saw your new how-to and that got me interested again.

Since I sent the patch two things happened;
- I saw that _cygtls::fixup_after_fork () uses oldmask. I am
  not sure what case it tries to cover (a fork happening just
  as a handler has started, between the moment where it sets 
  the new mask and the moment it has cleared sig?)
  but that wouldn't work well with my patch.
- I slept and somehow started to wonder how we can have handlers
  running in several tasks (and not just the main one, as before)
  while maintaining consistency in a single process mask. It
  seems to me that if handlers run in several tasks we have to move
  to the Posix model of per thread masks only. The code seems ready
  for that, but something must be holding you up.

I was also hoping that set_process_mask would become obsolete but
it's still needed in sigreturn. We need an absolute mask there.   

Pierre


Christopher Faylor wrote:
> 
> On Wed, Mar 10, 2004 at 11:26:19PM -0500, Pierre A. Humblet wrote:
> >2004-02-11  Pierre Humblet <pierre.humblet@ieee.org>
> >
> >       * gendef (_sigdelayed): Replace the call to
> >       set_process_mask by a call to set_process_mask_delta.
> >       * exceptions.cc (_cygtls::interrupt_setup): Set oldmask
> >       to the delta and don't set newmask.
> >       (set_process_mask_delta): New function.
> >       (_cygtls::call_signal_handler): Replace the first call to
> >       set_process_mask by a call to set_process_mask_delta.
> 
> 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?
> 
> cgf
> 
>   --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> 
>    sigmask.ccName: sigmask.cc
>              Type: Plain Text (text/plain)


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