diff options
| author | Chong Yidong | 2012-11-05 12:00:58 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-11-05 12:00:58 +0800 |
| commit | 209c6a58b92363aaa4de1238b73261694bba9d1f (patch) | |
| tree | acc7ea74eb7b7abce23331040de2e5756c29dd19 /src/process.c | |
| parent | dd0333b6155c9c3aabdac9418c005e2e5b4796e7 (diff) | |
| download | emacs-209c6a58b92363aaa4de1238b73261694bba9d1f.tar.gz emacs-209c6a58b92363aaa4de1238b73261694bba9d1f.zip | |
* process.c (wait_reading_process_output): Revert previous change.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/process.c b/src/process.c index 16600f94ce4..43f0239d301 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -4336,6 +4336,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4336 | 4336 | ||
| 4337 | while (1) | 4337 | while (1) |
| 4338 | { | 4338 | { |
| 4339 | int timeout_reduced_for_timers = 0; | ||
| 4340 | |||
| 4339 | /* If calling from keyboard input, do not quit | 4341 | /* If calling from keyboard input, do not quit |
| 4340 | since we want to return C-g as an input character. | 4342 | since we want to return C-g as an input character. |
| 4341 | Otherwise, do pending quit if requested. */ | 4343 | Otherwise, do pending quit if requested. */ |
| @@ -4415,7 +4417,10 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4415 | if (EMACS_TIME_VALID_P (timer_delay)) | 4417 | if (EMACS_TIME_VALID_P (timer_delay)) |
| 4416 | { | 4418 | { |
| 4417 | if (EMACS_TIME_LT (timer_delay, timeout)) | 4419 | if (EMACS_TIME_LT (timer_delay, timeout)) |
| 4418 | timeout = timer_delay; | 4420 | { |
| 4421 | timeout = timer_delay; | ||
| 4422 | timeout_reduced_for_timers = 1; | ||
| 4423 | } | ||
| 4419 | } | 4424 | } |
| 4420 | else | 4425 | else |
| 4421 | { | 4426 | { |
| @@ -4674,12 +4679,9 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4674 | /* If we woke up due to SIGWINCH, actually change size now. */ | 4679 | /* If we woke up due to SIGWINCH, actually change size now. */ |
| 4675 | do_pending_window_change (0); | 4680 | do_pending_window_change (0); |
| 4676 | 4681 | ||
| 4677 | /* We used to break here if nfds == 0, i.e. we seemed to have | 4682 | if ((time_limit || nsecs) && nfds == 0 && ! timeout_reduced_for_timers) |
| 4678 | waited the full period. But apparently if Emacs receives | 4683 | /* We waited the full specified time, so return now. */ |
| 4679 | SIGIO between set_waiting_for_input and select, select can | 4684 | break; |
| 4680 | return with nfds == 0 due to the timeout being zeroed out by | ||
| 4681 | the signal handler (Bug#11536). */ | ||
| 4682 | |||
| 4683 | if (nfds < 0) | 4685 | if (nfds < 0) |
| 4684 | { | 4686 | { |
| 4685 | if (xerrno == EINTR) | 4687 | if (xerrno == EINTR) |