aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c12
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