Commit a70d5371 authored by Nick Roberts's avatar Nick Roberts

(wait_reading_process_output): Keep the descriptor

when pty is used by a non-child process, e.g., in I/O buffer of
GDB this allows inferior to be restarted.
parent 548fe2f3
......@@ -5150,11 +5150,16 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display,
It can't hurt. */
else if (nread == -1 && errno == EIO)
{
/* Clear the descriptor now, so we only raise the signal once. */
FD_CLR (channel, &input_wait_mask);
FD_CLR (channel, &non_keyboard_wait_mask);
/* Clear the descriptor now, so we only raise the
signal once. Don't do this is `process' is only
a pty. */
if (XPROCESS (proc)->pid != -2)
{
FD_CLR (channel, &input_wait_mask);
FD_CLR (channel, &non_keyboard_wait_mask);
kill (getpid (), SIGCHLD);
kill (getpid (), SIGCHLD);
}
}
#endif /* HAVE_PTYS */
/* If we can detect process termination, don't consider the process
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment