diff options
| author | Chong Yidong | 2011-06-25 23:40:40 -0400 |
|---|---|---|
| committer | Chong Yidong | 2011-06-25 23:40:40 -0400 |
| commit | 029529ac6fadf07a532f2a90c3d4076db3516ba8 (patch) | |
| tree | e6e9bc5c9bfc7201be50b3d7224542fa8eb4605c /src/process.c | |
| parent | ee584d02ddc4d944a9055681eda52dc1d197bba0 (diff) | |
| download | emacs-029529ac6fadf07a532f2a90c3d4076db3516ba8.tar.gz emacs-029529ac6fadf07a532f2a90c3d4076db3516ba8.zip | |
Fix handling of pending signals in wait_reading_process_output (Bug#8869).
* process.c (wait_reading_process_output): Bypass select if
waiting for a cell while ignoring keyboard input, and input is
pending. Suggested by Jan Djärv.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/process.c b/src/process.c index c46437fe8cb..0fe7068af3b 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -4479,13 +4479,19 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd, | |||
| 4479 | set_waiting_for_input (&timeout); | 4479 | set_waiting_for_input (&timeout); |
| 4480 | } | 4480 | } |
| 4481 | 4481 | ||
| 4482 | /* Skip the `select' call if input is available and we're | ||
| 4483 | waiting for keyboard input or a cell change (which can be | ||
| 4484 | triggered by processing X events). In the latter case, set | ||
| 4485 | nfds to 1 to avoid breaking the loop. */ | ||
| 4482 | no_avail = 0; | 4486 | no_avail = 0; |
| 4483 | if (read_kbd && detect_input_pending ()) | 4487 | if ((read_kbd || !NILP (wait_for_cell)) |
| 4488 | && detect_input_pending ()) | ||
| 4484 | { | 4489 | { |
| 4485 | nfds = 0; | 4490 | nfds = read_kbd ? 0 : 1; |
| 4486 | no_avail = 1; | 4491 | no_avail = 1; |
| 4487 | } | 4492 | } |
| 4488 | else | 4493 | |
| 4494 | if (!no_avail) | ||
| 4489 | { | 4495 | { |
| 4490 | 4496 | ||
| 4491 | #ifdef ADAPTIVE_READ_BUFFERING | 4497 | #ifdef ADAPTIVE_READ_BUFFERING |