summaryrefslogtreecommitdiff
path: root/src/process.c
diff options
context:
space:
mode:
authorNick Roberts <nickrob@snap.net.nz>2009-08-30 04:54:34 +0000
committerNick Roberts <nickrob@snap.net.nz>2009-08-30 04:54:34 +0000
commita70d53714660efda646fb5bea89e71c749d605ef (patch)
tree99186ec70b0d53e97cd5f10dd5736719c660af6e /src/process.c
parent548fe2f3edc1296aeaa3e089afeaf4fd51bf695d (diff)
downloademacs-a70d53714660efda646fb5bea89e71c749d605ef.tar.gz
emacs-a70d53714660efda646fb5bea89e71c749d605ef.tar.bz2
emacs-a70d53714660efda646fb5bea89e71c749d605ef.zip
(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.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/process.c b/src/process.c
index 77ca2551e46..ed535170214 100644
--- a/src/process.c
+++ b/src/process.c
@@ -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