Mercurial > emacs
comparison src/process.c @ 83541:694bbb62a75d
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-371
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-372
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-373
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-374
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-375
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-376
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-377
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-378
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-379
Merge from erc--emacs--21
* emacs@sv.gnu.org/emacs--devo--0--patch-380
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-381
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-382
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-383
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-384
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-385
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-386
Update from erc--emacs--22
* emacs@sv.gnu.org/emacs--devo--0--patch-387
Fix ERC bug introduced in last patch
* emacs@sv.gnu.org/emacs--devo--0--patch-388
Update from erc--emacs--22
* emacs@sv.gnu.org/emacs--devo--0--patch-389
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-390
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-391
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-392
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-393
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-394
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-395
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-396
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-397
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-398
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-399
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-400
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-401
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-402
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-403
Rcirc update from Ryan Yeske
* emacs@sv.gnu.org/emacs--devo--0--patch-404
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-405
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-406
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-407
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-408
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-409
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-410
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-411
Miscellaneous tq-related fixes.
* emacs@sv.gnu.org/emacs--devo--0--patch-412
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-121
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-122
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-123
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-124
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-125
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-126
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-127
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-581
| author | Karoly Lorentey <lorentey@elte.hu> |
|---|---|
| date | Sat, 14 Oct 2006 16:56:21 +0000 |
| parents | b19aaf4ab0ee a6b9ee835f88 |
| children | 2d56e13fd23d |
comparison
equal
deleted
inserted
replaced
| 83540:0c89a85addc3 | 83541:694bbb62a75d |
|---|---|
| 4161 This is also used in record_asynch_buffer_change. | 4161 This is also used in record_asynch_buffer_change. |
| 4162 For that purpose, this must be 0 | 4162 For that purpose, this must be 0 |
| 4163 when not inside wait_reading_process_output. */ | 4163 when not inside wait_reading_process_output. */ |
| 4164 static int waiting_for_user_input_p; | 4164 static int waiting_for_user_input_p; |
| 4165 | 4165 |
| 4166 static Lisp_Object | |
| 4167 wait_reading_process_output_unwind (data) | |
| 4168 Lisp_Object data; | |
| 4169 { | |
| 4170 waiting_for_user_input_p = XINT (data); | |
| 4171 return Qnil; | |
| 4172 } | |
| 4173 | |
| 4166 /* This is here so breakpoints can be put on it. */ | 4174 /* This is here so breakpoints can be put on it. */ |
| 4167 static void | 4175 static void |
| 4168 wait_reading_process_output_1 () | 4176 wait_reading_process_output_1 () |
| 4169 { | 4177 { |
| 4170 } | 4178 } |
| 4243 int xerrno; | 4251 int xerrno; |
| 4244 Lisp_Object proc; | 4252 Lisp_Object proc; |
| 4245 EMACS_TIME timeout, end_time; | 4253 EMACS_TIME timeout, end_time; |
| 4246 int wait_channel = -1; | 4254 int wait_channel = -1; |
| 4247 int got_some_input = 0; | 4255 int got_some_input = 0; |
| 4248 /* Either nil or a cons cell, the car of which is of interest and | 4256 int count = SPECPDL_INDEX (); |
| 4249 may be changed outside of this routine. */ | |
| 4250 int saved_waiting_for_user_input_p = waiting_for_user_input_p; | |
| 4251 | 4257 |
| 4252 FD_ZERO (&Available); | 4258 FD_ZERO (&Available); |
| 4253 #ifdef NON_BLOCKING_CONNECT | 4259 #ifdef NON_BLOCKING_CONNECT |
| 4254 FD_ZERO (&Connecting); | 4260 FD_ZERO (&Connecting); |
| 4255 #endif | 4261 #endif |
| 4256 | 4262 |
| 4257 /* If wait_proc is a process to watch, set wait_channel accordingly. */ | 4263 /* If wait_proc is a process to watch, set wait_channel accordingly. */ |
| 4258 if (wait_proc != NULL) | 4264 if (wait_proc != NULL) |
| 4259 wait_channel = XINT (wait_proc->infd); | 4265 wait_channel = XINT (wait_proc->infd); |
| 4260 | 4266 |
| 4267 record_unwind_protect (wait_reading_process_output_unwind, | |
| 4268 make_number (waiting_for_user_input_p)); | |
| 4261 waiting_for_user_input_p = read_kbd; | 4269 waiting_for_user_input_p = read_kbd; |
| 4262 | 4270 |
| 4263 /* Since we may need to wait several times, | 4271 /* Since we may need to wait several times, |
| 4264 compute the absolute time to return at. */ | 4272 compute the absolute time to return at. */ |
| 4265 if (time_limit || microsecs) | 4273 if (time_limit || microsecs) |
| 4882 } | 4890 } |
| 4883 #endif /* NON_BLOCKING_CONNECT */ | 4891 #endif /* NON_BLOCKING_CONNECT */ |
| 4884 } /* end for each file descriptor */ | 4892 } /* end for each file descriptor */ |
| 4885 } /* end while exit conditions not met */ | 4893 } /* end while exit conditions not met */ |
| 4886 | 4894 |
| 4887 waiting_for_user_input_p = saved_waiting_for_user_input_p; | 4895 unbind_to (count, Qnil); |
| 4888 | 4896 |
| 4889 /* If calling from keyboard input, do not quit | 4897 /* If calling from keyboard input, do not quit |
| 4890 since we want to return C-g as an input character. | 4898 since we want to return C-g as an input character. |
| 4891 Otherwise, do pending quit if requested. */ | 4899 Otherwise, do pending quit if requested. */ |
| 4892 if (read_kbd >= 0) | 4900 if (read_kbd >= 0) |
