comparison src/signal.c @ 276:6330739388db r21-0b36

Import from CVS: tag r21-0b36
author cvs
date Mon, 13 Aug 2007 10:30:37 +0200
parents ca9a9ec9c1c1
children 90d73dddcdc4
comparison
equal deleted inserted replaced
275:a68ae4439f57 276:6330739388db
61 61
62 #if !defined (SIGIO) && !defined (DONT_POLL_FOR_QUIT) 62 #if !defined (SIGIO) && !defined (DONT_POLL_FOR_QUIT)
63 int poll_for_quit_id; 63 int poll_for_quit_id;
64 #endif 64 #endif
65 65
66 #ifndef SIGCHLD 66 #if defined(HAVE_UNIX_PROCESSES) && !defined(SIGCHLD)
67 int poll_for_sigchld_id; 67 int poll_for_sigchld_id;
68 #endif 68 #endif
69 69
70 /* This variable is used to communicate to a lisp 70 /* This variable is used to communicate to a lisp
71 process-filter/sentinel/asynchronous callback (via the function 71 process-filter/sentinel/asynchronous callback (via the function
550 poll_for_quit_id = 0; 550 poll_for_quit_id = 0;
551 } 551 }
552 #endif /* not SIGIO and not DONT_POLL_FOR_QUIT */ 552 #endif /* not SIGIO and not DONT_POLL_FOR_QUIT */
553 } 553 }
554 554
555 #ifndef SIGCHLD 555 #if defined(HAVE_UNIX_PROCESSES) && !defined(SIGCHLD)
556 556
557 static void 557 static void
558 init_poll_for_sigchld (void) 558 init_poll_for_sigchld (void)
559 { 559 {
560 /* Check for terminated processes every 1/4 of a second. 560 /* Check for terminated processes every 1/4 of a second.
638 if (! noninteractive || initialized) 638 if (! noninteractive || initialized)
639 { 639 {
640 /* Don't catch these signals in batch mode if not initialized. 640 /* Don't catch these signals in batch mode if not initialized.
641 On some machines, this sets static data that would make 641 On some machines, this sets static data that would make
642 signal fail to work right when the dumped Emacs is run. */ 642 signal fail to work right when the dumped Emacs is run. */
643 signal (SIGHUP, fatal_error_signal); 643 #ifdef SIGHUP
644 /* If we've been nohup'ed, keep it that way. */
645 if (signal (SIGHUP, fatal_error_signal) == SIG_IGN)
646 signal (SIGHUP, SIG_IGN);
647 #endif
648 #ifdef SIGQUIT
644 signal (SIGQUIT, fatal_error_signal); 649 signal (SIGQUIT, fatal_error_signal);
650 #endif
651 #ifdef SIGILL
645 signal (SIGILL, fatal_error_signal); 652 signal (SIGILL, fatal_error_signal);
653 #endif
646 #ifdef SIGTRAP 654 #ifdef SIGTRAP
647 signal (SIGTRAP, fatal_error_signal); 655 signal (SIGTRAP, fatal_error_signal);
648 #endif 656 #endif
649 #ifdef SIGABRT 657 #ifdef SIGABRT
650 signal (SIGABRT, fatal_error_signal); 658 signal (SIGABRT, fatal_error_signal);
768 #elif !defined (DONT_POLL_FOR_QUIT) 776 #elif !defined (DONT_POLL_FOR_QUIT)
769 init_poll_for_quit (); 777 init_poll_for_quit ();
770 #endif 778 #endif
771 } 779 }
772 780
773 #ifndef SIGCHLD 781 #if defined(HAVE_UNIX_PROCESSES) && !defined(SIGCHLD)
774 init_poll_for_sigchld (); 782 init_poll_for_sigchld ();
775 #endif 783 #endif
776 784
777 EMACS_UNBLOCK_ALL_SIGNALS (); 785 EMACS_UNBLOCK_ALL_SIGNALS ();
778 786