Mercurial > emacs
comparison src/process.c @ 72727:5f2a73453aa3
(inhibit_sentinels): New variable.
(exec_sentinel): Test inhibit_sentinels.
(init_process): Initialize it.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 08 Sep 2006 12:08:54 +0000 |
parents | a6b9ee835f88 |
children | ff880e40efba a1a25ac6c88a |
comparison
equal
deleted
inserted
replaced
72726:c7ba95ddeb1d | 72727:5f2a73453aa3 |
---|---|
316 to detect C-g. It isn't actually used when doing interrupt input. */ | 316 to detect C-g. It isn't actually used when doing interrupt input. */ |
317 #ifdef HAVE_WINDOW_SYSTEM | 317 #ifdef HAVE_WINDOW_SYSTEM |
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; |
324 | 330 |
325 /* Mask that excludes keyboard input descriptor (s). */ | 331 /* Mask that excludes keyboard input descriptor (s). */ |
384 #else | 390 #else |
385 #define DATAGRAM_CHAN_P(chan) (0) | 391 #define DATAGRAM_CHAN_P(chan) (0) |
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 | |
398 /* Nonzero means don't run process sentinels. This is used | |
399 when exiting. */ | |
400 int inhibit_sentinels; | |
397 | 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> |
401 #endif | 405 #endif |
6557 register struct Lisp_Process *p = XPROCESS (proc); | 6561 register struct Lisp_Process *p = XPROCESS (proc); |
6558 int count = SPECPDL_INDEX (); | 6562 int count = SPECPDL_INDEX (); |
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; |
6565 XSETBUFFER (obuffer, current_buffer); | 6572 XSETBUFFER (obuffer, current_buffer); |
6566 okeymap = current_buffer->keymap; | 6573 okeymap = current_buffer->keymap; |
6885 | 6892 |
6886 void | 6893 void |
6887 init_process () | 6894 init_process () |
6888 { | 6895 { |
6889 register int i; | 6896 register int i; |
6897 | |
6898 inhibit_sentinels = 0; | |
6890 | 6899 |
6891 #ifdef SIGCHLD | 6900 #ifdef SIGCHLD |
6892 #ifndef CANNOT_DUMP | 6901 #ifndef CANNOT_DUMP |
6893 if (! noninteractive || initialized) | 6902 if (! noninteractive || initialized) |
6894 #endif | 6903 #endif |