[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 8ed97a8: Make child signal read pipe non-blocking.
From: |
Philipp Stephani |
Subject: |
master 8ed97a8: Make child signal read pipe non-blocking. |
Date: |
Tue, 19 Jan 2021 15:40:25 -0500 (EST) |
branch: master
commit 8ed97a8d543b9596166c670212265dabc44aa3d5
Author: Philipp Stephani <phst@google.com>
Commit: Philipp Stephani <phst@google.com>
Make child signal read pipe non-blocking.
Otherwise Emacs might hang when trying to read the pipe twice in a
row. This is consistent with the other file descriptors we pass to
'pselect'.
* src/process.c (child_signal_init): Make read end of pipe
non-blocking.
---
src/process.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/process.c b/src/process.c
index 09f8790..5710598 100644
--- a/src/process.c
+++ b/src/process.c
@@ -7179,6 +7179,8 @@ child_signal_init (void)
exits. */
eassert (0 <= fds[0]);
eassert (0 <= fds[1]);
+ if (fcntl (fds[0], 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];
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 8ed97a8: Make child signal read pipe non-blocking.,
Philipp Stephani <=