aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2006-09-08 12:08:54 +0000
committerRichard M. Stallman2006-09-08 12:08:54 +0000
commit84af9896c3fa9eea2ae12eb67136fa8f8460fb4a (patch)
tree9b83968c937f62d0d18a22c8f0ad978e9ba0d176
parent5596b3bcf58e97fcf4dfbfbc7906593b9b6150d7 (diff)
downloademacs-84af9896c3fa9eea2ae12eb67136fa8f8460fb4a.tar.gz
emacs-84af9896c3fa9eea2ae12eb67136fa8f8460fb4a.zip
(inhibit_sentinels): New variable.
(exec_sentinel): Test inhibit_sentinels. (init_process): Initialize it.
-rw-r--r--src/process.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/process.c b/src/process.c
index b24dee002c6..46bff2f94a3 100644
--- a/src/process.c
+++ b/src/process.c
@@ -318,6 +318,12 @@ static int read_process_output P_ ((Lisp_Object, int));
318#define POLL_FOR_INPUT 318#define POLL_FOR_INPUT
319#endif 319#endif
320 320
321static Lisp_Object get_process ();
322static void exec_sentinel ();
323
324extern EMACS_TIME timer_check ();
325extern int timers_run;
326
321/* Mask of bits indicating the descriptors that we wait for input on. */ 327/* Mask of bits indicating the descriptors that we wait for input on. */
322 328
323static SELECT_TYPE input_wait_mask; 329static SELECT_TYPE input_wait_mask;
@@ -386,15 +392,13 @@ struct sockaddr_and_len {
386#define DATAGRAM_CONN_P(proc) (0) 392#define DATAGRAM_CONN_P(proc) (0)
387#endif 393#endif
388 394
389static Lisp_Object get_process ();
390static void exec_sentinel ();
391
392extern EMACS_TIME timer_check ();
393extern int timers_run;
394
395/* Maximum number of bytes to send to a pty without an eof. */ 395/* Maximum number of bytes to send to a pty without an eof. */
396static int pty_max_bytes; 396static int pty_max_bytes;
397 397
398/* Nonzero means don't run process sentinels. This is used
399 when exiting. */
400int inhibit_sentinels;
401
398#ifdef HAVE_PTYS 402#ifdef HAVE_PTYS
399#ifdef HAVE_PTY_H 403#ifdef HAVE_PTY_H
400#include <pty.h> 404#include <pty.h>
@@ -6559,6 +6563,9 @@ exec_sentinel (proc, reason)
6559 int outer_running_asynch_code = running_asynch_code; 6563 int outer_running_asynch_code = running_asynch_code;
6560 int waiting = waiting_for_user_input_p; 6564 int waiting = waiting_for_user_input_p;
6561 6565
6566 if (inhibit_sentinels)
6567 return;
6568
6562 /* No need to gcpro these, because all we do with them later 6569 /* No need to gcpro these, because all we do with them later
6563 is test them for EQness, and none of them should be a string. */ 6570 is test them for EQness, and none of them should be a string. */
6564 odeactivate = Vdeactivate_mark; 6571 odeactivate = Vdeactivate_mark;
@@ -6888,6 +6895,8 @@ init_process ()
6888{ 6895{
6889 register int i; 6896 register int i;
6890 6897
6898 inhibit_sentinels = 0;
6899
6891#ifdef SIGCHLD 6900#ifdef SIGCHLD
6892#ifndef CANNOT_DUMP 6901#ifndef CANNOT_DUMP
6893 if (! noninteractive || initialized) 6902 if (! noninteractive || initialized)