]> git.eshelyaron.com Git - emacs.git/commitdiff
(wait_reading_process_input): Make reentrant.
authorKim F. Storm <storm@cua.dk>
Thu, 13 May 2004 23:07:07 +0000 (23:07 +0000)
committerKim F. Storm <storm@cua.dk>
Thu, 13 May 2004 23:07:07 +0000 (23:07 +0000)
Make Available and Connecting non-static.  Save and restore value
of waiting_for_user_input_p.

src/process.c

index bbfc06c308228e86f3bbb30e6076957ed4137e7b..463d56ffb3d43194bffefa6d7a1e12a2f39f835a 100644 (file)
@@ -4018,8 +4018,8 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
      int do_display;
 {
   register int channel, nfds;
-  static SELECT_TYPE Available;
-  static SELECT_TYPE Connecting;
+  SELECT_TYPE Available;
+  SELECT_TYPE Connecting;
   int check_connect, check_delay, no_avail;
   int xerrno;
   Lisp_Object proc;
@@ -4030,6 +4030,7 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
   /* Either nil or a cons cell, the car of which is of interest and
      may be changed outside of this routine.  */
   Lisp_Object wait_for_cell = Qnil;
+  int saved_waiting_for_user_input_p = waiting_for_user_input_p;
 
   FD_ZERO (&Available);
   FD_ZERO (&Connecting);
@@ -4643,7 +4644,7 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
        }                       /* end for each file descriptor */
     }                          /* end while exit conditions not met */
 
-  waiting_for_user_input_p = 0;
+  waiting_for_user_input_p = saved_waiting_for_user_input_p;
 
   /* If calling from keyboard input, do not quit
      since we want to return C-g as an input character.