Skip to content

Commit

Permalink
Don't crash if no asynchronous process has been created yet.
Browse files Browse the repository at this point in the history
* src/process.c (wait_reading_process_output): Allow
child_signal_read_fd < 0.
  • Loading branch information
phst committed Jan 16, 2021
1 parent 8f0ce42 commit df34ed8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/process.c
Expand Up @@ -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
Expand Down

0 comments on commit df34ed8

Please sign in to comment.