aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorEli Zaretskii2010-07-13 13:57:00 +0300
committerEli Zaretskii2010-07-13 13:57:00 +0300
commit77defa9a250f03a401300d055a98e6f3a5a9e4d2 (patch)
tree81456f3ad0f5cc63acd10ed1f1ac1d3f71e66b5f /src/process.c
parent2047750525b9f9fd0181433246c5c0743b7df3d7 (diff)
downloademacs-77defa9a250f03a401300d055a98e6f3a5a9e4d2.tar.gz
emacs-77defa9a250f03a401300d055a98e6f3a5a9e4d2.zip
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.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/src/process.c b/src/process.c
index bd1a651a8b8..219098905cf 100644
--- a/src/process.c
+++ b/src/process.c
@@ -304,6 +304,10 @@ static int kbd_is_on_hold;
304/* Nonzero means delete a process right away if it exits. */ 304/* Nonzero means delete a process right away if it exits. */
305static int delete_exited_processes; 305static int delete_exited_processes;
306 306
307/* Nonzero means don't run process sentinels. This is used
308 when exiting. */
309int 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. */
@@ -381,10 +385,6 @@ struct sockaddr_and_len {
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. */
382static int pty_max_bytes; 386static int pty_max_bytes;
383 387
384/* Nonzero means don't run process sentinels. This is used
385 when exiting. */
386int inhibit_sentinels;
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>
@@ -5433,15 +5433,6 @@ read_process_output (Lisp_Object proc, register int channel)
5433 unbind_to (count, Qnil); 5433 unbind_to (count, Qnil);
5434 return nbytes; 5434 return nbytes;
5435} 5435}
5436
5437DEFUN ("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.
5440This 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
@@ -7279,6 +7270,19 @@ kill_buffer_processes (Lisp_Object buffer)
7279#endif /* subprocesses */ 7270#endif /* subprocesses */
7280} 7271}
7281 7272
7273DEFUN ("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.
7276This 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
7284}
7285
7282/* Stop reading input from keyboard sources. */ 7286/* Stop reading input from keyboard sources. */
7283 7287
7284void 7288void