summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilipp Stephani <phst@google.com>2021-01-23 17:24:34 +0100
committerPhilipp Stephani <phst@google.com>2021-01-23 17:26:49 +0100
commitaeff424c555da7e80775482db84eecef10286fc3 (patch)
treed7038b940cff6e8f3408380f95be7662516879cf /src
parent6a6fde0375d499a418f81a0dafe803d6cb0d4c97 (diff)
downloademacs-aeff424c555da7e80775482db84eecef10286fc3.tar.gz
Mark both ends of self-pipe a nonblocking.
While no deadlocks caused by the blocking write end have been reported yet, marking both ends nonblocking is consistent and also recommended in the GNU/Linux manpage of 'select'. * src/process.c (child_signal_init): Mark write end of self-pipe as nonblocking.
Diffstat (limited to 'src')
-rw-r--r--src/process.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/process.c b/src/process.c
index 697d9b0b19b..9b1de19f0ae 100644
--- a/src/process.c
+++ b/src/process.c
@@ -7195,6 +7195,8 @@ child_signal_init (void)
eassert (0 <= fds[1]);
if (fcntl (fds[0], F_SETFL, O_NONBLOCK) != 0)
emacs_perror ("fcntl");
+ if (fcntl (fds[1], F_SETFL, O_NONBLOCK) != 0)
+ emacs_perror ("fcntl");
add_read_fd (fds[0], child_signal_read, NULL);
fd_callback_info[fds[0]].flags &= ~KEYBOARD_FD;
child_signal_read_fd = fds[0];