aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Stephani2021-01-10 17:59:29 +0100
committerPhilipp Stephani2021-01-16 19:46:44 +0100
commitdf34ed8cbfdcf4584aa0ebfe827fac3a8d932bb6 (patch)
tree1bf216b1121c9ed91f8a987411dd9399d3f59a85
parent8f0ce42d3eb9b212424a4a25a376287ffc94a73e (diff)
downloademacs-df34ed8cbfdcf4584aa0ebfe827fac3a8d932bb6.tar.gz
emacs-df34ed8cbfdcf4584aa0ebfe827fac3a8d932bb6.zip
Don't crash if no asynchronous process has been created yet.scratch/sigchld-fd
* src/process.c (wait_reading_process_output): Allow child_signal_read_fd < 0.
-rw-r--r--src/process.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/process.c b/src/process.c
index 474c87089e0..aca87f8ed35 100644
--- a/src/process.c
+++ b/src/process.c
@@ -5413,9 +5413,9 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
5413 an asynchronous process. Otherwise this might deadlock if we 5413 an asynchronous process. Otherwise this might deadlock if we
5414 receive a SIGCHLD during `pselect'. */ 5414 receive a SIGCHLD during `pselect'. */
5415 int child_fd = child_signal_read_fd; 5415 int child_fd = child_signal_read_fd;
5416 eassert (0 <= child_fd);
5417 eassert (child_fd < FD_SETSIZE); 5416 eassert (child_fd < FD_SETSIZE);
5418 FD_SET (child_fd, &Available); 5417 if (0 <= child_fd)
5418 FD_SET (child_fd, &Available);
5419 5419
5420 /* If frame size has changed or the window is newly mapped, 5420 /* If frame size has changed or the window is newly mapped,
5421 redisplay now, before we start to wait. There is a race 5421 redisplay now, before we start to wait. There is a race