aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-03-27 02:35:15 +0000
committerRichard M. Stallman1996-03-27 02:35:15 +0000
commitc573ae8ec0116fe87f15e77e7f84ba39aaafee8c (patch)
tree8c151fe840c6fc8241abe29a668dbf09918c30bd
parente622cacad2ecdeeb03f82508c29810613f9209f2 (diff)
downloademacs-c573ae8ec0116fe87f15e77e7f84ba39aaafee8c.tar.gz
emacs-c573ae8ec0116fe87f15e77e7f84ba39aaafee8c.zip
(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.
-rw-r--r--src/process.c24
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.")
1959 when not inside wait_reading_process_input. */ 1959 when not inside wait_reading_process_input. */
1960static int waiting_for_user_input_p; 1960static int waiting_for_user_input_p;
1961 1961
1962/* This is here so breakpoints can be put on it. */
1963static
1964wait_reading_process_input_1 ()
1965{
1966}
1967
1962/* Read and dispose of subprocess output while waiting for timeout to 1968/* Read and dispose of subprocess output while waiting for timeout to
1963 elapse and/or keyboard input to be available. 1969 elapse and/or keyboard input to be available.
1964 1970
@@ -2079,10 +2085,19 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
2079 if (1) 2085 if (1)
2080 { 2086 {
2081 EMACS_TIME timer_delay; 2087 EMACS_TIME timer_delay;
2082 int old_timers_run = timers_run; 2088 int old_timers_run;
2089
2090 retry:
2091 old_timers_run = timers_run;
2083 timer_delay = timer_check (1); 2092 timer_delay = timer_check (1);
2084 if (timers_run != old_timers_run && do_display) 2093 if (timers_run != old_timers_run && do_display)
2085 redisplay_preserve_echo_area (); 2094 {
2095 redisplay_preserve_echo_area ();
2096 /* We must retry, since a timer may have requeued itself
2097 and that could alter the time_delay. */
2098 goto retry;
2099 }
2100
2086 if (! EMACS_TIME_NEG_P (timer_delay) && time_limit != -1) 2101 if (! EMACS_TIME_NEG_P (timer_delay) && time_limit != -1)
2087 { 2102 {
2088 EMACS_TIME difference; 2103 EMACS_TIME difference;
@@ -2093,6 +2108,11 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
2093 timeout_reduced_for_timers = 1; 2108 timeout_reduced_for_timers = 1;
2094 } 2109 }
2095 } 2110 }
2111 else
2112 {
2113 /* This is so a breakpoint can be put here. */
2114 wait_reading_process_input_1 ();
2115 }
2096 } 2116 }
2097 2117
2098 /* Cause C-g and alarm signals to take immediate action, 2118 /* Cause C-g and alarm signals to take immediate action,