diff options
| author | Eli Zaretskii | 2025-11-15 19:48:08 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2025-11-15 19:48:08 +0200 |
| commit | 28f0658d8f5e9dce9564bb94826654e8e0e625fa (patch) | |
| tree | 14a472157f53c89a17ddfcaa497926c7c7d4de98 /src/process.c | |
| parent | fd5e3b123e7b000c2d80c73b2ff6970d84d7ce04 (diff) | |
| download | emacs-28f0658d8f5e9dce9564bb94826654e8e0e625fa.tar.gz emacs-28f0658d8f5e9dce9564bb94826654e8e0e625fa.zip | |
Fix processing sub-process exit when keyboard input is pending
* src/process.c (wait_reading_process_output): Process status
changes of sub-processes when called with read_kbd zero and some
"keyboard input" is available, but no output from any sub-process.
(Bug#79777)
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/process.c b/src/process.c index 86e83e58c56..3d4ecb82b08 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -5844,6 +5844,18 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 5844 | 5844 | ||
| 5845 | if (nfds == 0) | 5845 | if (nfds == 0) |
| 5846 | { | 5846 | { |
| 5847 | if (!read_kbd && update_tick != process_tick) | ||
| 5848 | { | ||
| 5849 | /* This is for the case where we bypassed a similar call | ||
| 5850 | above, after the first thread_select, because some | ||
| 5851 | input was available, but later found in the second | ||
| 5852 | thread_select that input was only "from keyboard", | ||
| 5853 | which we need to ignore because we were called with | ||
| 5854 | read_kbd zero. We should therefore process the changed | ||
| 5855 | status of sub-processes. */ | ||
| 5856 | got_some_output = status_notify (NULL, wait_proc); | ||
| 5857 | if (do_display) redisplay_preserve_echo_area (113); | ||
| 5858 | } | ||
| 5847 | /* Exit the main loop if we've passed the requested timeout, | 5859 | /* Exit the main loop if we've passed the requested timeout, |
| 5848 | or have read some bytes from our wait_proc (either directly | 5860 | or have read some bytes from our wait_proc (either directly |
| 5849 | in this call or indirectly through timers / process filters), | 5861 | in this call or indirectly through timers / process filters), |