aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorPhilipp Stephani2021-01-23 17:24:34 +0100
committerPhilipp Stephani2021-01-23 17:26:49 +0100
commitaeff424c555da7e80775482db84eecef10286fc3 (patch)
treed7038b940cff6e8f3408380f95be7662516879cf /src/process.c
parent6a6fde0375d499a418f81a0dafe803d6cb0d4c97 (diff)
downloademacs-aeff424c555da7e80775482db84eecef10286fc3.tar.gz
emacs-aeff424c555da7e80775482db84eecef10286fc3.zip
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/process.c')
-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)
7195 eassert (0 <= fds[1]); 7195 eassert (0 <= fds[1]);
7196 if (fcntl (fds[0], F_SETFL, O_NONBLOCK) != 0) 7196 if (fcntl (fds[0], F_SETFL, O_NONBLOCK) != 0)
7197 emacs_perror ("fcntl"); 7197 emacs_perror ("fcntl");
7198 if (fcntl (fds[1], F_SETFL, O_NONBLOCK) != 0)
7199 emacs_perror ("fcntl");
7198 add_read_fd (fds[0], child_signal_read, NULL); 7200 add_read_fd (fds[0], child_signal_read, NULL);
7199 fd_callback_info[fds[0]].flags &= ~KEYBOARD_FD; 7201 fd_callback_info[fds[0]].flags &= ~KEYBOARD_FD;
7200 child_signal_read_fd = fds[0]; 7202 child_signal_read_fd = fds[0];