diff options
author | Christopher Faylor <me@cgf.cx> | 2012-03-29 05:45:49 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2012-03-29 05:45:49 +0000 |
commit | 74daacfd319562ce79bc22e98a4d506f7cc1d413 (patch) | |
tree | adb16ef8ad09a61e280bf95e4a4a3eba19af7410 | |
parent | cf22fb91a1cf7232857833ff39538823fafca3d7 (diff) | |
download | cygnal-74daacfd319562ce79bc22e98a4d506f7cc1d413.tar.gz cygnal-74daacfd319562ce79bc22e98a4d506f7cc1d413.tar.bz2 cygnal-74daacfd319562ce79bc22e98a4d506f7cc1d413.zip |
* exceptions.cc (ctrl_c_handler): Don't generate a SIGINT if we've execed a
non-cygwin process. Let the Windows process deal with it itself.
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/exceptions.cc | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 5c02e0c15..4aa1a005c 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2012-03-29 Christopher Faylor <me.cygwin2012@cgf.cx> + + * exceptions.cc (ctrl_c_handler): Don't generate a SIGINT if we've + execed a non-cygwin process. Let the Windows process deal with it + itself. + 2012-03-28 Christopher Faylor <me.cygwin2012@cgf.cx> * sigproc.cc (proc_terminate): Avoid releasing myself. diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index c6497f3b1..458029f35 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -996,8 +996,9 @@ ctrl_c_handler (DWORD type) tty_min *t = cygwin_shared->tty.get_cttyp (); /* Ignore this if we're not the process group leader since it should be handled *by* the process group leader. */ - if (t && t->getpgid () == myself->pid && - (GetTickCount () - t->last_ctrl_c) >= MIN_CTRL_C_SLOP) + if (t && (!have_execed || have_execed_cygwin) + && t->getpgid () == myself->pid && + (GetTickCount () - t->last_ctrl_c) >= MIN_CTRL_C_SLOP) /* Otherwise we just send a SIGINT to the process group and return TRUE (to indicate that we have handled the signal). At this point, type should be a CTRL_C_EVENT or CTRL_BREAK_EVENT. */ |