diff options
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 21 |
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 | ||
| 321 | static Lisp_Object get_process (); | ||
| 322 | static void exec_sentinel (); | ||
| 323 | |||
| 324 | extern EMACS_TIME timer_check (); | ||
| 325 | extern 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 | ||
| 323 | static SELECT_TYPE input_wait_mask; | 329 | static 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 | ||
| 389 | static Lisp_Object get_process (); | ||
| 390 | static void exec_sentinel (); | ||
| 391 | |||
| 392 | extern EMACS_TIME timer_check (); | ||
| 393 | extern 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. */ |
| 396 | static int pty_max_bytes; | 396 | static int pty_max_bytes; |
| 397 | 397 | ||
| 398 | /* Nonzero means don't run process sentinels. This is used | ||
| 399 | when exiting. */ | ||
| 400 | int 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) |