diff options
| author | Chong Yidong | 2012-11-04 00:36:23 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-11-04 00:36:23 +0800 |
| commit | 85fabcb7ee546bf689727fb7b26f33414f55b46d (patch) | |
| tree | 44d4b26264572ae0aa670403d6b25d9165e81172 /src | |
| parent | 893cc4558558db41e16525303023372496a293b7 (diff) | |
| download | emacs-85fabcb7ee546bf689727fb7b26f33414f55b46d.tar.gz emacs-85fabcb7ee546bf689727fb7b26f33414f55b46d.zip | |
* process.c (wait_reading_process_output): Clean up last change.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/process.c | 17 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e26dd561495..193246c4fad 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-11-03 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * process.c (wait_reading_process_output): Clean up the last | ||
| 4 | change. | ||
| 5 | |||
| 1 | 2012-11-03 Jim Paris <jim@jtan.com> (tiny change) | 6 | 2012-11-03 Jim Paris <jim@jtan.com> (tiny change) |
| 2 | 7 | ||
| 3 | * process.c (wait_reading_process_output): Avoid a race condition | 8 | * process.c (wait_reading_process_output): Avoid a race condition |
diff --git a/src/process.c b/src/process.c index dae687cb59c..29c880da3b0 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -4354,8 +4354,6 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4354 | 4354 | ||
| 4355 | while (1) | 4355 | while (1) |
| 4356 | { | 4356 | { |
| 4357 | int timeout_reduced_for_timers = 0; | ||
| 4358 | |||
| 4359 | /* If calling from keyboard input, do not quit | 4357 | /* If calling from keyboard input, do not quit |
| 4360 | since we want to return C-g as an input character. | 4358 | since we want to return C-g as an input character. |
| 4361 | Otherwise, do pending quit if requested. */ | 4359 | Otherwise, do pending quit if requested. */ |
| @@ -4435,10 +4433,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4435 | if (EMACS_TIME_VALID_P (timer_delay)) | 4433 | if (EMACS_TIME_VALID_P (timer_delay)) |
| 4436 | { | 4434 | { |
| 4437 | if (EMACS_TIME_LT (timer_delay, timeout)) | 4435 | if (EMACS_TIME_LT (timer_delay, timeout)) |
| 4438 | { | 4436 | timeout = timer_delay; |
| 4439 | timeout = timer_delay; | ||
| 4440 | timeout_reduced_for_timers = 1; | ||
| 4441 | } | ||
| 4442 | } | 4437 | } |
| 4443 | else | 4438 | else |
| 4444 | { | 4439 | { |
| @@ -4697,11 +4692,11 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4697 | /* If we woke up due to SIGWINCH, actually change size now. */ | 4692 | /* If we woke up due to SIGWINCH, actually change size now. */ |
| 4698 | do_pending_window_change (0); | 4693 | do_pending_window_change (0); |
| 4699 | 4694 | ||
| 4700 | /* The following optimization fails if SIGIO is received between | 4695 | /* We used to break here if nfds == 0, i.e. we seemed to have |
| 4701 | set_waiting_for_input and select (Bug#11536). | 4696 | waited the full period. But apparently if Emacs receives |
| 4702 | if ((time_limit || nsecs) && nfds == 0 && ! timeout_reduced_for_timers) | 4697 | SIGIO between set_waiting_for_input and select, select can |
| 4703 | break; | 4698 | return with nfds == 0 due to the timeout being zeroed out by |
| 4704 | */ | 4699 | the signal handler (Bug#11536). */ |
| 4705 | 4700 | ||
| 4706 | if (nfds < 0) | 4701 | if (nfds < 0) |
| 4707 | { | 4702 | { |