[PATCH] Cygwin: sigproc: Do not send signal to myself if exiting.
Corinna Vinschen
corinna-cygwin@cygwin.com
Fri Nov 19 15:51:06 GMT 2021
Hi Takashi,
On Nov 19 20:50, Takashi Yano wrote:
> - 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 ----*/
> 3) Run "tcsh -c ./a.exe"
> 4) Hit Ctrl-C.
> ---
> winsup/cygwin/sigproc.cc | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
> index 97211edcf..9160dd160 100644
> --- a/winsup/cygwin/sigproc.cc
> +++ b/winsup/cygwin/sigproc.cc
> @@ -603,6 +603,10 @@ sig_send (_pinfo *p, siginfo_t& si, _cygtls *tls)
> its_me = false;
> }
>
> + /* Do not send signal to myself if exiting. */
> + if (its_me && exit_state > ES_EXIT_STARTING && si.si_signo > 0)
> + goto out;
> +
> if (its_me)
> sendsig = my_sendsig;
> else
> --
> 2.33.0
Isn't that already handled in wait_sig? What's the difference here?
Thx,
Corinna
More information about the Cygwin-patches
mailing list