From: Philipp Stephani Date: Sun, 10 Jan 2021 16:59:29 +0000 (+0100) Subject: Don't crash if no asynchronous process has been created yet. X-Git-Tag: emacs-28.0.90~4247 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=df34ed8cbfdcf4584aa0ebfe827fac3a8d932bb6;p=emacs.git Don't crash if no asynchronous process has been created yet. * src/process.c (wait_reading_process_output): Allow child_signal_read_fd < 0. --- 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, an asynchronous process. Otherwise this might deadlock if we receive a SIGCHLD during `pselect'. */ int child_fd = child_signal_read_fd; - eassert (0 <= child_fd); eassert (child_fd < FD_SETSIZE); - FD_SET (child_fd, &Available); + if (0 <= child_fd) + FD_SET (child_fd, &Available); /* If frame size has changed or the window is newly mapped, redisplay now, before we start to wait. There is a race