Commit ef874e3d authored by Andreas Schwab's avatar Andreas Schwab
Browse files

(sys_signal): Always set SA_RESTART when

parent c1e4ceb7
2008-10-06 Andreas Schwab <>
* sysdep.c (sys_signal): Always set SA_RESTART when
2008-10-06 Chong Yidong <>
* emacs.c (Vbefore_init_time, Vafter_init_time): Moved from
......@@ -2124,7 +2124,8 @@ sys_signal (int signal_number, signal_handler_t action)
struct sigaction new_action, old_action;
sigemptyset (&new_action.sa_mask);
new_action.sa_handler = action;
#if defined (SA_RESTART) && ! defined (BROKEN_SA_RESTART) && !defined(SYNC_INPUT)
new_action.sa_flags = 0;
#if defined (SA_RESTART)
/* Emacs mostly works better with restartable system services. If this
flag exists, we probably want to turn it on here.
However, on some systems this resets the timeout of `select'
......@@ -2134,9 +2135,10 @@ sys_signal (int signal_number, signal_handler_t action)
When SYNC_INPUT is set, we don't want SA_RESTART because we need to poll
for pending input so we need long-running syscalls to be interrupted
after a signal that sets the interrupt_input_pending flag. */
new_action.sa_flags = SA_RESTART;
new_action.sa_flags = 0;
# if defined (BROKEN_SA_RESTART) || defined(SYNC_INPUT)
if (noninteractive)
# endif
new_action.sa_flags = SA_RESTART;
sigaction (signal_number, &new_action, &old_action);
return (old_action.sa_handler);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment