[PATCH 2/3] Provide ucontext to signal handlers

Corinna Vinschen corinna-cygwin@cygwin.com
Thu Apr 23 15:32:00 GMT 2015


Hi Jon,

On Apr 23 14:53, Jon TURNEY wrote:
> On 01/04/2015 18:36, Jon TURNEY wrote:
> >On 01/04/2015 15:22, Corinna Vinschen wrote:
> >>It would be better to call RtlCaptureContext
> >>before calling call_signal_handler.  But this requires a change in how
> >>call_signal_handler is called.
> >>
> >>We should discuss this at one point, I think.
> 
> I noticed that we already prepare a context for continuing after the signal
> for the debugger, so perhaps this is not quite as complex as I thought and
> something like the attached is needed.

signal_debugger() is (basically) called for all signals, but in case
there's no GDB attached, only signals for which a signal handler
function is called need the context.  Isn't it a bit heavyweight to
suspend and capture the context for all signals then, perhaps?

> It's very hard to reason about if this is doing the right thing when the
> signal is delivered across threads, though.

Indeed.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20150423/1d7dd707/attachment.sig>


More information about the Cygwin-patches mailing list