From 59e9ec72442d264a3e08c9886ad3b49fa8dc9f37 Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Sat, 23 Jan 2021 18:39:20 +0100 Subject: [PATCH] Add a FIXME comment to improve the SIGCHLD race condition handling. * src/process.c: Add FIXME comment describing how we could avoid the self-pipe on modern Unix-like systems. --- src/process.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/process.c b/src/process.c index 9b1de19f0ae..8abdcd4f0c1 100644 --- a/src/process.c +++ b/src/process.c @@ -7164,6 +7164,11 @@ process has been transmitted to the serial port. */) because that emulation delays the delivery of the simulated SIGCHLD until all the output from the subprocess has been consumed. */ +/* FIXME: On Unix-like systems that have a proper 'pselect' + (HAVE_PSELECT), we should block SIGCHLD in + 'wait_reading_process_output' and pass a non-NULL signal mask to + 'pselect' to avoid the need for the self-pipe. */ + /* Set up `child_signal_read_fd' and `child_signal_write_fd'. */ static void -- 2.39.5