summaryrefslogtreecommitdiff
path: root/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/signal.c b/signal.c
index a56152e9e4..3f4a90b522 100644
--- a/signal.c
+++ b/signal.c
@@ -986,8 +986,10 @@ install_sighandler(int signum, sighandler_t handler)
{
sighandler_t old;
+ /* At this time, there is no subthread. Then sigmask guarantee atomics. */
rb_disable_interrupt();
old = ruby_signal(signum, handler);
+ /* signal handler should be inherited during exec. */
if (old != SIG_DFL) {
ruby_signal(signum, old);
}