aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorMiles Bader2006-08-03 11:45:23 +0000
committerMiles Bader2006-08-03 11:45:23 +0000
commite2b97060142842813b657144787cef3e6e743967 (patch)
treed7f76853b585d08837d3321504a759919c5fbb42 /src/process.c
parenta8fa10a629c86144c90b8b0e58f99581c4e82aba (diff)
parent9b7fa2975f40b82e94dadd13c049ff67ef0ef449 (diff)
downloademacs-e2b97060142842813b657144787cef3e6e743967.tar.gz
emacs-e2b97060142842813b657144787cef3e6e743967.zip
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 357-381) - Merge from gnus--rel--5.10 - Update from CVS - Merge from erc--emacs--21 * gnus--rel--5.10 (patch 116-122) - Update from CVS - Merge from emacs--devo--0 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-98
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/process.c b/src/process.c
index 45bf6446644..b218a952e5f 100644
--- a/src/process.c
+++ b/src/process.c
@@ -4157,6 +4157,14 @@ server_accept_connection (server, channel)
4157 when not inside wait_reading_process_output. */ 4157 when not inside wait_reading_process_output. */
4158static int waiting_for_user_input_p; 4158static int waiting_for_user_input_p;
4159 4159
4160static Lisp_Object
4161wait_reading_process_output_unwind (data)
4162 Lisp_Object data;
4163{
4164 waiting_for_user_input_p = XINT (data);
4165 return Qnil;
4166}
4167
4160/* This is here so breakpoints can be put on it. */ 4168/* This is here so breakpoints can be put on it. */
4161static void 4169static void
4162wait_reading_process_output_1 () 4170wait_reading_process_output_1 ()
@@ -4239,9 +4247,7 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display,
4239 EMACS_TIME timeout, end_time; 4247 EMACS_TIME timeout, end_time;
4240 int wait_channel = -1; 4248 int wait_channel = -1;
4241 int got_some_input = 0; 4249 int got_some_input = 0;
4242 /* Either nil or a cons cell, the car of which is of interest and 4250 int count = SPECPDL_INDEX ();
4243 may be changed outside of this routine. */
4244 int saved_waiting_for_user_input_p = waiting_for_user_input_p;
4245 4251
4246 FD_ZERO (&Available); 4252 FD_ZERO (&Available);
4247#ifdef NON_BLOCKING_CONNECT 4253#ifdef NON_BLOCKING_CONNECT
@@ -4252,6 +4258,8 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display,
4252 if (wait_proc != NULL) 4258 if (wait_proc != NULL)
4253 wait_channel = XINT (wait_proc->infd); 4259 wait_channel = XINT (wait_proc->infd);
4254 4260
4261 record_unwind_protect (wait_reading_process_output_unwind,
4262 make_number (waiting_for_user_input_p));
4255 waiting_for_user_input_p = read_kbd; 4263 waiting_for_user_input_p = read_kbd;
4256 4264
4257 /* Since we may need to wait several times, 4265 /* Since we may need to wait several times,
@@ -4878,7 +4886,7 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display,
4878 } /* end for each file descriptor */ 4886 } /* end for each file descriptor */
4879 } /* end while exit conditions not met */ 4887 } /* end while exit conditions not met */
4880 4888
4881 waiting_for_user_input_p = saved_waiting_for_user_input_p; 4889 unbind_to (count, Qnil);
4882 4890
4883 /* If calling from keyboard input, do not quit 4891 /* If calling from keyboard input, do not quit
4884 since we want to return C-g as an input character. 4892 since we want to return C-g as an input character.