Commit 84af9896 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(inhibit_sentinels): New variable.

(exec_sentinel): Test inhibit_sentinels.
(init_process): Initialize it.
parent 5596b3bc
...@@ -318,6 +318,12 @@ static int read_process_output P_ ((Lisp_Object, int)); ...@@ -318,6 +318,12 @@ static int read_process_output P_ ((Lisp_Object, int));
#define POLL_FOR_INPUT #define POLL_FOR_INPUT
#endif #endif
static Lisp_Object get_process ();
static void exec_sentinel ();
extern EMACS_TIME timer_check ();
extern int timers_run;
/* Mask of bits indicating the descriptors that we wait for input on. */ /* Mask of bits indicating the descriptors that we wait for input on. */
static SELECT_TYPE input_wait_mask; static SELECT_TYPE input_wait_mask;
...@@ -386,15 +392,13 @@ struct sockaddr_and_len { ...@@ -386,15 +392,13 @@ struct sockaddr_and_len {
#define DATAGRAM_CONN_P(proc) (0) #define DATAGRAM_CONN_P(proc) (0)
#endif #endif
static Lisp_Object get_process ();
static void exec_sentinel ();
extern EMACS_TIME timer_check ();
extern int timers_run;
/* Maximum number of bytes to send to a pty without an eof. */ /* Maximum number of bytes to send to a pty without an eof. */
static int pty_max_bytes; static int pty_max_bytes;
/* Nonzero means don't run process sentinels. This is used
when exiting. */
int inhibit_sentinels;
#ifdef HAVE_PTYS #ifdef HAVE_PTYS
#ifdef HAVE_PTY_H #ifdef HAVE_PTY_H
#include <pty.h> #include <pty.h>
...@@ -6559,6 +6563,9 @@ exec_sentinel (proc, reason) ...@@ -6559,6 +6563,9 @@ exec_sentinel (proc, reason)
int outer_running_asynch_code = running_asynch_code; int outer_running_asynch_code = running_asynch_code;
int waiting = waiting_for_user_input_p; int waiting = waiting_for_user_input_p;
if (inhibit_sentinels)
return;
/* No need to gcpro these, because all we do with them later /* No need to gcpro these, because all we do with them later
is test them for EQness, and none of them should be a string. */ is test them for EQness, and none of them should be a string. */
odeactivate = Vdeactivate_mark; odeactivate = Vdeactivate_mark;
...@@ -6888,6 +6895,8 @@ init_process () ...@@ -6888,6 +6895,8 @@ init_process ()
{ {
register int i; register int i;
inhibit_sentinels = 0;
#ifdef SIGCHLD #ifdef SIGCHLD
#ifndef CANNOT_DUMP #ifndef CANNOT_DUMP
if (! noninteractive || initialized) if (! noninteractive || initialized)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment