aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2011-06-25 23:40:40 -0400
committerChong Yidong2011-06-25 23:40:40 -0400
commit029529ac6fadf07a532f2a90c3d4076db3516ba8 (patch)
treee6e9bc5c9bfc7201be50b3d7224542fa8eb4605c /src
parentee584d02ddc4d944a9055681eda52dc1d197bba0 (diff)
downloademacs-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')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/process.c12
2 files changed, 16 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e21412187c7..2c8b22dc321 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12011-06-26 Chong Yidong <cyd@stupidchicken.com>
2
3 * process.c (wait_reading_process_output): Bypass select if
4 waiting for a cell while ignoring keyboard input, and input is
5 pending. Suggested by Jan Djärv (Bug#8869).
6
12011-06-25 Paul Eggert <eggert@cs.ucla.edu> 72011-06-25 Paul Eggert <eggert@cs.ucla.edu>
2 8
3 Use gnulib's dup2 module instead of rolling our own. 9 Use gnulib's dup2 module instead of rolling our own.
@@ -351,7 +357,7 @@
351 357
3522011-06-22 Jim Meyering <meyering@redhat.com> 3582011-06-22 Jim Meyering <meyering@redhat.com>
353 359
354 don't leak an XBM-image-sized buffer 360 Don't leak an XBM-image-sized buffer
355 * image.c (xbm_load): Free the image buffer after using it. 361 * image.c (xbm_load): Free the image buffer after using it.
356 362
3572011-06-21 Paul Eggert <eggert@cs.ucla.edu> 3632011-06-21 Paul Eggert <eggert@cs.ucla.edu>
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