Mercurial > emacs
comparison src/process.c @ 109378:4e99d7aa7526
Remove more "#ifdef subprocesses".
process.c <inhibit_sentinels>: Move to the common part.
(Fwaiting_for_user_input_p): Move to the common part; return nil
if async subprocesses aren't supported.
sysdep.c (wait_for_termination) [!MSDOS]: Don't compile on
MS-DOS. Remove "#ifdef subprocesses".
(sys_subshell, sys_select): Remove "#ifdef subprocesses".
(gettimeofday): Remove "#ifdef subprocesses".
(wait_without_blocking): Remove function.
(flush_pending_output, child_setup_tty): Don't compile on MS-DOS.
Remove "#ifdef subprocesses".
(child_setup_tty): Use WINDOWSNT instead of DOS_NT, since not
compiled on MS-DOS.
callproc.c (Fcall_process) [!MSDOS]: Don't call
wait_for_termination on MS-DOS.
emacs.c (shut_down_emacs): Remove "#ifndef subprocesses" from
initialization of inhibit_sentinels.
keyboard.c (record_asynch_buffer_change): Remove "#ifdef
subprocesses" conditional.
callproc.c (Fcall_process) [!subprocesses]: Don't call
wait_for_termination, since `buffer' cannot be an integer when
async subprocesses are not supported
xdisp.c (decode_mode_spec): Use `MSDOS' instead of `subprocesses'
for ifdefing away the call to Fprocess_status.
| author | Eli Zaretskii <eliz@gnu.org> |
|---|---|
| date | Tue, 13 Jul 2010 13:57:00 +0300 |
| parents | cef697cc4464 |
| children | 039143f82441 |
comparison
equal
deleted
inserted
replaced
| 109377:cef697cc4464 | 109378:4e99d7aa7526 |
|---|---|
| 302 static int kbd_is_on_hold; | 302 static int kbd_is_on_hold; |
| 303 | 303 |
| 304 /* Nonzero means delete a process right away if it exits. */ | 304 /* Nonzero means delete a process right away if it exits. */ |
| 305 static int delete_exited_processes; | 305 static int delete_exited_processes; |
| 306 | 306 |
| 307 /* Nonzero means don't run process sentinels. This is used | |
| 308 when exiting. */ | |
| 309 int inhibit_sentinels; | |
| 310 | |
| 307 #ifdef subprocesses | 311 #ifdef subprocesses |
| 308 | 312 |
| 309 /* Mask of bits indicating the descriptors that we wait for input on. */ | 313 /* Mask of bits indicating the descriptors that we wait for input on. */ |
| 310 | 314 |
| 311 static SELECT_TYPE input_wait_mask; | 315 static SELECT_TYPE input_wait_mask; |
| 378 #define DATAGRAM_CONN_P(proc) (0) | 382 #define DATAGRAM_CONN_P(proc) (0) |
| 379 #endif | 383 #endif |
| 380 | 384 |
| 381 /* Maximum number of bytes to send to a pty without an eof. */ | 385 /* Maximum number of bytes to send to a pty without an eof. */ |
| 382 static int pty_max_bytes; | 386 static int pty_max_bytes; |
| 383 | |
| 384 /* Nonzero means don't run process sentinels. This is used | |
| 385 when exiting. */ | |
| 386 int inhibit_sentinels; | |
| 387 | 387 |
| 388 #ifdef HAVE_PTYS | 388 #ifdef HAVE_PTYS |
| 389 #ifdef HAVE_PTY_H | 389 #ifdef HAVE_PTY_H |
| 390 #include <pty.h> | 390 #include <pty.h> |
| 391 #endif | 391 #endif |
| 5431 Vdeactivate_mark = odeactivate; | 5431 Vdeactivate_mark = odeactivate; |
| 5432 | 5432 |
| 5433 unbind_to (count, Qnil); | 5433 unbind_to (count, Qnil); |
| 5434 return nbytes; | 5434 return nbytes; |
| 5435 } | 5435 } |
| 5436 | |
| 5437 DEFUN ("waiting-for-user-input-p", Fwaiting_for_user_input_p, Swaiting_for_user_input_p, | |
| 5438 0, 0, 0, | |
| 5439 doc: /* Returns non-nil if Emacs is waiting for input from the user. | |
| 5440 This is intended for use by asynchronous process output filters and sentinels. */) | |
| 5441 (void) | |
| 5442 { | |
| 5443 return (waiting_for_user_input_p ? Qt : Qnil); | |
| 5444 } | |
| 5445 | 5436 |
| 5446 /* Sending data to subprocess */ | 5437 /* Sending data to subprocess */ |
| 5447 | 5438 |
| 5448 jmp_buf send_process_frame; | 5439 jmp_buf send_process_frame; |
| 5449 Lisp_Object process_sent_to; | 5440 Lisp_Object process_sent_to; |
| 7275 } | 7266 } |
| 7276 } | 7267 } |
| 7277 #else /* subprocesses */ | 7268 #else /* subprocesses */ |
| 7278 /* Since we have no subprocesses, this does nothing. */ | 7269 /* Since we have no subprocesses, this does nothing. */ |
| 7279 #endif /* subprocesses */ | 7270 #endif /* subprocesses */ |
| 7271 } | |
| 7272 | |
| 7273 DEFUN ("waiting-for-user-input-p", Fwaiting_for_user_input_p, Swaiting_for_user_input_p, | |
| 7274 0, 0, 0, | |
| 7275 doc: /* Returns non-nil if Emacs is waiting for input from the user. | |
| 7276 This is intended for use by asynchronous process output filters and sentinels. */) | |
| 7277 (void) | |
| 7278 { | |
| 7279 #ifdef subprocesses | |
| 7280 return (waiting_for_user_input_p ? Qt : Qnil); | |
| 7281 #else | |
| 7282 return Qnil; | |
| 7283 #endif | |
| 7280 } | 7284 } |
| 7281 | 7285 |
| 7282 /* Stop reading input from keyboard sources. */ | 7286 /* Stop reading input from keyboard sources. */ |
| 7283 | 7287 |
| 7284 void | 7288 void |
