mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-03-06 15:06:25 +08:00
Cygwin: signal: Fix a problem that process hangs on exit
The process that receives many SIGSTOP/SIGCONT signals sometimes hangs on exit in sig_dispatch_pending(). This patch skips processing signals in call_signal_handler() when exit_state > ES_EXIT_STARTING to avoid that situation. Addresses: https://cygwin.com/pipermail/cygwin/2025-February/257473.html Fixes: d243e51ef1d3 ("Cygwin: signal: Fix deadlock between main thread and sig thread") Reported-by: Christian Franke <Christian.Franke@t-online.de> Reviewed-by: Corinna Vinschen <corinna@vinschen.de> Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
This commit is contained in:
parent
1debf2732b
commit
3c1308ed89
@ -1675,7 +1675,7 @@ _cygtls::call_signal_handler ()
|
||||
while (1)
|
||||
{
|
||||
lock ();
|
||||
if (!current_sig)
|
||||
if (!current_sig || exit_state > ES_EXIT_STARTING)
|
||||
{
|
||||
unlock ();
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user