[PATCH] Cygwin: Fix signal handling issue introduced by PTY related change.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Cygwin: Fix signal handling issue introduced by PTY related change.

Takashi Yano
- After commit 41864091014b63b0cb72ae98281fa53349b6ef77, there is a
  regression in signal handling reported in
  https://www.cygwin.com/ml/cygwin/2019-10/msg00010.html. This patch
  fixes the issue.
---
 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 db0fe0867..132fea427 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -949,7 +949,7 @@ _cygtls::interrupt_setup (siginfo_t& si, void *handler, struct sigaction& siga)
   if (incyg)
     set_signal_arrived ();
 
-  if (!have_execed && ch_spawn.iscygwin ())
+  if (!have_execed && !(myself->exec_sendsig && !ch_spawn.iscygwin ()))
     proc_subproc (PROC_CLEARWAIT, 1);
   sigproc_printf ("armed signal_arrived %p, signal %d",
   signal_arrived, si.si_signo);
--
2.21.0

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Cygwin: Fix signal handling issue introduced by PTY related change.

Ken Brown-6
On 10/3/2019 6:43 AM, Takashi Yano wrote:

> - After commit 41864091014b63b0cb72ae98281fa53349b6ef77, there is a
>    regression in signal handling reported in
>    https://www.cygwin.com/ml/cygwin/2019-10/msg00010.html. This patch
>    fixes the issue.
> ---
>   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 db0fe0867..132fea427 100644
> --- a/winsup/cygwin/exceptions.cc
> +++ b/winsup/cygwin/exceptions.cc
> @@ -949,7 +949,7 @@ _cygtls::interrupt_setup (siginfo_t& si, void *handler, struct sigaction& siga)
>     if (incyg)
>       set_signal_arrived ();
>  
> -  if (!have_execed && ch_spawn.iscygwin ())
> +  if (!have_execed && !(myself->exec_sendsig && !ch_spawn.iscygwin ()))
>       proc_subproc (PROC_CLEARWAIT, 1);
>     sigproc_printf ("armed signal_arrived %p, signal %d",
>    signal_arrived, si.si_signo);

Pushed.  Thanks.

Ken
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Cygwin: Fix signal handling issue introduced by PTY related change.

Michael Haubenwallner-2
In reply to this post by Takashi Yano
On 10/3/19 12:43 PM, Takashi Yano wrote:
> - After commit 41864091014b63b0cb72ae98281fa53349b6ef77, there is a
>   regression in signal handling reported in
>   https://www.cygwin.com/ml/cygwin/2019-10/msg00010.html. This patch
>   fixes the issue.

Confirmed, this patch fixes the issue.

Thanks!
/haubi/