summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1998-08-15 05:53:00 +0000
committerRichard M. Stallman <rms@gnu.org>1998-08-15 05:53:00 +0000
commit68c164e59829b929f2644ef61c04c253be749c16 (patch)
tree586546d9ef866cb1f87b0a27738ce84cbcc0457f
parent35d717bb09d4ec0704bd0630b999f5a663d6b57a (diff)
downloademacs-68c164e59829b929f2644ef61c04c253be749c16.tar.gz
(wait_reading_process_input): If a pty gives EIO,
raise SIGCHLD just in case.
-rw-r--r--src/process.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/process.c b/src/process.c
index 2ca75250706..0e5ae9e3fe2 100644
--- a/src/process.c
+++ b/src/process.c
@@ -2676,9 +2676,13 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
Therefore, if we get an error reading and errno =
EIO, just continue, because the child process has
exited and should clean itself up soon (e.g. when we
- get a SIGCHLD). */
+ get a SIGCHLD).
+
+ However, it has been known to happen that the SIGCHLD
+ got lost. So raise the signl again just in case.
+ It can't hurt. */
else if (nread == -1 && errno == EIO)
- ;
+ kill (getpid (), SIGCHLD);
#endif /* HAVE_PTYS */
/* If we can detect process termination, don't consider the process
gone just because its pipe is closed. */