comparison src/signal.c @ 16:0293115a14e9 r19-15b91

Import from CVS: tag r19-15b91
author cvs
date Mon, 13 Aug 2007 08:49:20 +0200
parents 376386a54a3c
children 859a2309aef8
comparison
equal deleted inserted replaced
15:ad457d5f7d04 16:0293115a14e9
81 81
82 /* Used so that signals can break out of system calls that aren't 82 /* Used so that signals can break out of system calls that aren't
83 naturally interruptible. */ 83 naturally interruptible. */
84 84
85 JMP_BUF break_system_call_jump; 85 JMP_BUF break_system_call_jump;
86 int can_break_system_calls; 86 volatile int can_break_system_calls;
87 87
88 88
89 /**********************************************************************/ 89 /**********************************************************************/
90 /* Asynchronous timeout functions */ 90 /* Asynchronous timeout functions */
91 /**********************************************************************/ 91 /**********************************************************************/
617 #endif 617 #endif
618 start_async_timeouts (); 618 start_async_timeouts ();
619 } 619 }
620 620
621 /* Cheesy but workable implementation of sleep() that doesn't 621 /* Cheesy but workable implementation of sleep() that doesn't
622 interfere with out periodic timers. */ 622 interfere with our periodic timers. */
623 623
624 void 624 void
625 emacs_sleep (int secs) 625 emacs_sleep (int secs)
626 { 626 {
627 stop_interrupts (); 627 stop_interrupts ();
641 if (! noninteractive || initialized) 641 if (! noninteractive || initialized)
642 { 642 {
643 /* Don't catch these signals in batch mode if not initialized. 643 /* Don't catch these signals in batch mode if not initialized.
644 On some machines, this sets static data that would make 644 On some machines, this sets static data that would make
645 signal fail to work right when the dumped Emacs is run. */ 645 signal fail to work right when the dumped Emacs is run. */
646 signal (SIGHUP, fatal_error_signal); 646 signal (SIGHUP, fatal_error_signal);
647 signal (SIGQUIT, fatal_error_signal); 647 signal (SIGQUIT, fatal_error_signal);
648 signal (SIGILL, fatal_error_signal); 648 signal (SIGILL, fatal_error_signal);
649 signal (SIGTRAP, fatal_error_signal); 649 signal (SIGTRAP, fatal_error_signal);
650 #ifdef SIGABRT 650 #ifdef SIGABRT
651 signal (SIGABRT, fatal_error_signal); 651 signal (SIGABRT, fatal_error_signal);
652 #endif 652 #endif
653 #ifdef SIGHWE 653 #ifdef SIGHWE
715 #endif 715 #endif
716 #ifdef SIGVTALRM 716 #ifdef SIGVTALRM
717 signal (SIGVTALRM, fatal_error_signal); 717 signal (SIGVTALRM, fatal_error_signal);
718 #endif 718 #endif
719 #ifdef SIGPROF 719 #ifdef SIGPROF
720 signal (SIGPROF, fatal_error_signal); 720 /* Messes up the REAL profiler */
721 /* signal (SIGPROF, fatal_error_signal); */
721 #endif 722 #endif
722 #ifdef SIGUNUSED /* exists under Linux, and will kill process! */ 723 #ifdef SIGUNUSED /* exists under Linux, and will kill process! */
723 signal (SIGUNUSED, fatal_error_signal); 724 signal (SIGUNUSED, fatal_error_signal);
724 #endif 725 #endif
725 726
726 #ifdef AIX 727 #ifdef AIX
727 /* 20 is SIGCHLD, 21 is SIGTTIN, 22 is SIGTTOU. */ 728 /* 20 is SIGCHLD, 21 is SIGTTIN, 22 is SIGTTOU. */
728 #ifndef _I386 729 #ifndef _I386
729 signal (SIGIOINT, fatal_error_signal); 730 signal (SIGIOINT, fatal_error_signal);
730 #endif 731 #endif
731 signal (SIGGRANT, fatal_error_signal); 732 signal (SIGGRANT, fatal_error_signal);
732 signal (SIGRETRACT, fatal_error_signal); 733 signal (SIGRETRACT, fatal_error_signal);
733 signal (SIGSOUND, fatal_error_signal); 734 signal (SIGSOUND, fatal_error_signal);
734 signal (SIGMSG, fatal_error_signal); 735 signal (SIGMSG, fatal_error_signal);
735 #endif /* AIX */ 736 #endif /* AIX */
736 } 737 }
737 } 738 }
738 739
739 void 740 void