On Mar  6 14:36, Jon Turney wrote:
> On 06/03/2025 11:12, Corinna Vinschen wrote:
> > On Mar  6 20:02, Takashi Yano wrote:
> > > The commit 3c1308ed890e adds a guard to stop signal handling on exit()
> > > in call_signal_handler(). However, the signal that is already queued
> > > but does not use signal handler may be going to process even with that
> > > patch.
> > > This patch add one more guard at the begining of sigpacket::process()
> > > to avoid that situation.
> > > 
> > > Fixes: 3c1308ed890e ("Cygwin: signal: Fix a problem that process hangs on 
> > > exit")
> > > Reviewed-by:
> > > Signed-off-by: Takashi Yano <takashi.y...@nifty.ne.jp>
> > > ---
> > >   winsup/cygwin/exceptions.cc | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
> > > index 759f89dca..a67529b19 100644
> > > --- a/winsup/cygwin/exceptions.cc
> > > +++ b/winsup/cygwin/exceptions.cc
> > > @@ -1457,7 +1457,7 @@ sigpacket::process ()
> > >     /* Don't try to send signals if we're just starting up since signal 
> > > masks
> > >        may not be available.  */
> 
> Looks like this comment should be updated? Maybe just "starting up or
> shutting down"? Or the reason why sending signal while shutting down is
> unsafe?

Sure!  Feel free to push a patch along these lines.


Corinna

Reply via email to