aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/sysdep.c10
2 files changed, 11 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 75a336b7727..e56ddb55db6 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12008-10-06 Andreas Schwab <schwab@suse.de>
2
3 * sysdep.c (sys_signal): Always set SA_RESTART when
4 noninteractively.
5
12008-10-06 Chong Yidong <cyd@stupidchicken.com> 62008-10-06 Chong Yidong <cyd@stupidchicken.com>
2 7
3 * emacs.c (Vbefore_init_time, Vafter_init_time): Moved from 8 * emacs.c (Vbefore_init_time, Vafter_init_time): Moved from
diff --git a/src/sysdep.c b/src/sysdep.c
index b1d072e729f..96ab3996953 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -2124,7 +2124,8 @@ sys_signal (int signal_number, signal_handler_t action)
2124 struct sigaction new_action, old_action; 2124 struct sigaction new_action, old_action;
2125 sigemptyset (&new_action.sa_mask); 2125 sigemptyset (&new_action.sa_mask);
2126 new_action.sa_handler = action; 2126 new_action.sa_handler = action;
2127#if defined (SA_RESTART) && ! defined (BROKEN_SA_RESTART) && !defined(SYNC_INPUT) 2127 new_action.sa_flags = 0;
2128#if defined (SA_RESTART)
2128 /* Emacs mostly works better with restartable system services. If this 2129 /* Emacs mostly works better with restartable system services. If this
2129 flag exists, we probably want to turn it on here. 2130 flag exists, we probably want to turn it on here.
2130 However, on some systems this resets the timeout of `select' 2131 However, on some systems this resets the timeout of `select'
@@ -2134,9 +2135,10 @@ sys_signal (int signal_number, signal_handler_t action)
2134 When SYNC_INPUT is set, we don't want SA_RESTART because we need to poll 2135 When SYNC_INPUT is set, we don't want SA_RESTART because we need to poll
2135 for pending input so we need long-running syscalls to be interrupted 2136 for pending input so we need long-running syscalls to be interrupted
2136 after a signal that sets the interrupt_input_pending flag. */ 2137 after a signal that sets the interrupt_input_pending flag. */
2137 new_action.sa_flags = SA_RESTART; 2138# if defined (BROKEN_SA_RESTART) || defined(SYNC_INPUT)
2138#else 2139 if (noninteractive)
2139 new_action.sa_flags = 0; 2140# endif
2141 new_action.sa_flags = SA_RESTART;
2140#endif 2142#endif
2141 sigaction (signal_number, &new_action, &old_action); 2143 sigaction (signal_number, &new_action, &old_action);
2142 return (old_action.sa_handler); 2144 return (old_action.sa_handler);