]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't crash if no asynchronous process has been created yet.
authorPhilipp Stephani <phst@google.com>
Sun, 10 Jan 2021 16:59:29 +0000 (17:59 +0100)
committerPhilipp Stephani <phst@google.com>
Sat, 16 Jan 2021 18:46:44 +0000 (19:46 +0100)
* src/process.c (wait_reading_process_output): Allow
child_signal_read_fd < 0.

src/process.c

index 474c87089e092b2783ee52c16dd46c994a8763c0..aca87f8ed353a777b65d5772957c1bfd5a82832d 100644 (file)
@@ -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