Cygwin: pty: Fix the behaviour of Ctrl-C in the pseudo console mode.

- When the I/O pipe is switched to the pseudo console side, the
  behaviour of Ctrl-C was unstable. This rarely happens, however,
  for example, shell sometimes crashes by Ctrl-C in that situation.
  Furthermore, Ctrl-C was ignored if output of non-cygwin program
  is redirected to pipe. This patch fixes these issues.
This commit is contained in:
Takashi Yano
2019-09-08 21:58:35 +09:00
committed by Ken Brown
parent 9786b05595
commit b088f50426
4 changed files with 50 additions and 42 deletions

View File

@@ -1294,7 +1294,7 @@ pty_slave_startup (select_record *me, select_stuff *stuff)
{
fhandler_base *fh = (fhandler_base *) me->fh;
fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh;
if (me->read_selected && ptys->get_pcon_pid () != myself->pid)
if (me->read_selected)
ptys->mask_switch_to_pcon (true);
select_pipe_info *pi = stuff->device_specific_ptys;