summaryrefslogtreecommitdiff
path: root/libguile/scmsigs.c
diff options
context:
space:
mode:
Diffstat (limited to 'libguile/scmsigs.c')
-rw-r--r--libguile/scmsigs.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libguile/scmsigs.c b/libguile/scmsigs.c
index f3970eb20..072613492 100644
--- a/libguile/scmsigs.c
+++ b/libguile/scmsigs.c
@@ -434,9 +434,26 @@ scm_init_scmsigs ()
got_signal[i] = 0;
#ifdef HAVE_SIGACTION
orig_handlers[i].sa_handler = SIG_ERR;
+
#else
orig_handlers[i] = SIG_ERR;
#endif
+
+#ifdef HAVE_RESTARTS
+ /* ensure that system calls will be restarted for all signals. */
+ /* sigintterupt would be simpler, but it seems better to avoid
+ dependency on another system call. */
+ {
+ struct sigaction action;
+
+ sigaction (i, NULL, &action);
+ if (!(action.sa_flags & SA_RESTART))
+ {
+ action.sa_flags &= SA_RESTART;
+ sigaction (i, &action, NULL);
+ }
+ }
+#endif
}
scm_sysintern ("NSIG", scm_long2num (NSIG));