diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-03-27 02:35:15 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-03-27 02:35:15 +0000 |
commit | 5de1dff6f41a84fba06852a4c39e17d1f394c5bd (patch) | |
tree | d0377608a91aa43c4e89bce44d2e355f7ee41dfd /src/process.c | |
parent | f9e3fedf086acd1d8b4e2c5678a176306d8cdf64 (diff) | |
download | emacs-5de1dff6f41a84fba06852a4c39e17d1f394c5bd.tar.gz |
(wait_reading_process_input_1): New (empty) function.
(wait_reading_process_input): Call wait_reading_process_input_1.
If timer_check runs some timers, retry it.
Diffstat (limited to 'src/process.c')
-rw-r--r-- | src/process.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/process.c b/src/process.c index 26cba986476..fda6e5e773e 100644 --- a/src/process.c +++ b/src/process.c @@ -1959,6 +1959,12 @@ Return non-nil iff we received any output before the timeout expired.") when not inside wait_reading_process_input. */ static int waiting_for_user_input_p; +/* This is here so breakpoints can be put on it. */ +static +wait_reading_process_input_1 () +{ +} + /* Read and dispose of subprocess output while waiting for timeout to elapse and/or keyboard input to be available. @@ -2079,10 +2085,19 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) if (1) { EMACS_TIME timer_delay; - int old_timers_run = timers_run; + int old_timers_run; + + retry: + old_timers_run = timers_run; timer_delay = timer_check (1); if (timers_run != old_timers_run && do_display) - redisplay_preserve_echo_area (); + { + redisplay_preserve_echo_area (); + /* We must retry, since a timer may have requeued itself + and that could alter the time_delay. */ + goto retry; + } + if (! EMACS_TIME_NEG_P (timer_delay) && time_limit != -1) { EMACS_TIME difference; @@ -2093,6 +2108,11 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) timeout_reduced_for_timers = 1; } } + else + { + /* This is so a breakpoint can be put here. */ + wait_reading_process_input_1 (); + } } /* Cause C-g and alarm signals to take immediate action, |