Cygwin: console: Revert experimental code mixed accidentally.
- The commit "Cygwin: console: Restore CTRL_BREAK_EVENT handling." was accidentally mixed with experimental code in exceptions.cc. Due to this, non-cygwin app receives CTRL_C_EVENT twice in the following scenario. 1) Run 'sleep 10 | <non-cygwin app>' 2) Hit Ctrl-C. 3) The non-cygwin app receives CTRL_C_EVENT twice. This patch reverts the code with the problem.
This commit is contained in:
parent
95a60b7fdd
commit
696a713bf2
|
@ -1174,8 +1174,14 @@ ctrl_c_handler (DWORD type)
|
||||||
(to indicate that we have handled the signal). At this point, type
|
(to indicate that we have handled the signal). At this point, type
|
||||||
should be a CTRL_C_EVENT or CTRL_BREAK_EVENT. */
|
should be a CTRL_C_EVENT or CTRL_BREAK_EVENT. */
|
||||||
{
|
{
|
||||||
|
int sig = SIGINT;
|
||||||
|
/* If intr and quit are both mapped to ^C, send SIGQUIT on ^BREAK */
|
||||||
|
if (type == CTRL_BREAK_EVENT
|
||||||
|
&& t->ti.c_cc[VINTR] == 3 && t->ti.c_cc[VQUIT] == 3)
|
||||||
|
sig = SIGQUIT;
|
||||||
t->last_ctrl_c = GetTickCount64 ();
|
t->last_ctrl_c = GetTickCount64 ();
|
||||||
fhandler_termios::process_sigs ('\003', (tty *) t, ::cygheap->ctty);
|
t->kill_pgrp (sig);
|
||||||
|
t->output_stopped = false;
|
||||||
t->last_ctrl_c = GetTickCount64 ();
|
t->last_ctrl_c = GetTickCount64 ();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue