From bb0dc1c297478b322c0fca747a941352e97cf786 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 18 Oct 2013 20:56:19 +0000 Subject: [PATCH] * fhandler_termios.cc (tty_min::kill_pgrp): Don't send a signal to myself if this process is exiting. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/fhandler_termios.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index c2a5ee3d8..5e3dbdabc 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2013-10-18 Christopher Faylor + + * fhandler_termios.cc (tty_min::kill_pgrp): Don't send a signal to + myself if this process is exiting. + 2013-10-18 Christopher Faylor * tty.cc (tty_list::allocate): Set sid to 0 rather than -1 since -1 is diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc index fdf758918..d0751f81f 100644 --- a/winsup/cygwin/fhandler_termios.cc +++ b/winsup/cygwin/fhandler_termios.cc @@ -137,7 +137,7 @@ tty_min::kill_pgrp (int sig) if (!p->exists () || p->ctty != ntty || p->pgid != pgid) continue; if (p == myself) - killself = sig != __SIGSETPGRP; + killself = sig != __SIGSETPGRP && !exit_state; else sig_send (p, si); }