Cygwin: sigproc: Do not send signal to myself if exiting.
- This patch fixes the issue that process sometimes hangs for 60 seconds with the following scenario. 1) Open command prompt. 2) Run "c:\cygwin64\bin\bash -l" 3) Compipe the following source with mingw compiler. /*--- Begin ---*/ #include <stdio.h> int main() {return getchar();} /*---- End ----*/ 4) Run "tcsh -c ./a.exe" 5) Hit Ctrl-C.
This commit is contained in:
parent
c8b779aff4
commit
a92d69d743
|
@ -603,6 +603,11 @@ sig_send (_pinfo *p, siginfo_t& si, _cygtls *tls)
|
|||
its_me = false;
|
||||
}
|
||||
|
||||
/* Do not send signal to myself if exiting, which will be
|
||||
ignored in wait_sig thread. */
|
||||
if (its_me && exit_state > ES_EXIT_STARTING && si.si_signo > 0)
|
||||
goto out;
|
||||
|
||||
if (its_me)
|
||||
sendsig = my_sendsig;
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue