comparison src/sysdep.c @ 46298:c6d9317e4393

(sys_signal): Test BROKEN_SA_RESTART.
author Richard M. Stallman <rms@gnu.org>
date Thu, 11 Jul 2002 17:29:56 +0000
parents 863817d7e734
children 40db0673e6f0
comparison
equal deleted inserted replaced
46297:e3a0f935c9c5 46298:c6d9317e4393
2814 sys_signal (int signal_number, signal_handler_t action) 2814 sys_signal (int signal_number, signal_handler_t action)
2815 { 2815 {
2816 struct sigaction new_action, old_action; 2816 struct sigaction new_action, old_action;
2817 sigemptyset (&new_action.sa_mask); 2817 sigemptyset (&new_action.sa_mask);
2818 new_action.sa_handler = action; 2818 new_action.sa_handler = action;
2819 #ifdef SA_RESTART 2819 #if defined (SA_RESTART) && ! defined (BROKEN_SA_RESTART)
2820 /* Emacs mostly works better with restartable system services. If this 2820 /* Emacs mostly works better with restartable system services. If this
2821 * flag exists, we probably want to turn it on here. 2821 flag exists, we probably want to turn it on here.
2822 */ 2822 However, on some systems this resets the timeout of `select'
2823 which means that `select' never finishes if it keeps getting signals.
2824 BROKEN_SA_RESTART is defined on those systems. */
2823 new_action.sa_flags = SA_RESTART; 2825 new_action.sa_flags = SA_RESTART;
2824 #else 2826 #else
2825 new_action.sa_flags = 0; 2827 new_action.sa_flags = 0;
2826 #endif 2828 #endif
2827 sigaction (signal_number, &new_action, &old_action); 2829 sigaction (signal_number, &new_action, &old_action);