* subshell.c (synchronize): Discard all remaining data from

stdin to the subshell.
This commit is contained in:
Pavel Roskin 2002-08-19 02:06:01 +00:00
parent 105877896d
commit 11bd8d9c39
2 changed files with 7 additions and 0 deletions

View File

@ -1,5 +1,8 @@
2002-08-18 Pavel Roskin <proski@gnu.org>
* subshell.c (synchronize): Discard all remaining data from
stdin to the subshell.
* subshell.c (exit_subshell) [AIX_TCSH_CODE_BELOW_IS_IT_FIXED]:
Remove. Nobody has fixed this code for years.

View File

@ -1042,6 +1042,10 @@ static void synchronize (void)
/* Wait until the subshell has stopped */
while (subshell_alive && !subshell_stopped)
sigsuspend (&old_mask);
/* Discard all remaining data from stdin to the subshell */
tcflush (subshell_pty, TCOFLUSH);
subshell_stopped = FALSE;
kill (subshell_pid, SIGCONT);