summaryrefslogtreecommitdiff
path: root/signal.c
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-12 05:12:29 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-12 05:12:29 +0000
commit7fd8266516393afb6e9fdedd028e01daccc46c75 (patch)
tree4f423d023f60650f5964f29e8a069d223b820720 /signal.c
parentc307523565e0a8815bfd0d7deeed8b9ae7796e16 (diff)
small cleanup
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/signal.c b/signal.c
index d98aa03b53..103514ae64 100644
--- a/signal.c
+++ b/signal.c
@@ -1021,31 +1021,15 @@ static void
init_sigchld(int sig)
{
sighandler_t oldfunc;
-#if USE_TRAP_MASK
- sigset_t mask;
- sigset_t fullmask;
-
- /*
- * disable interrupt. Otherwise following temmporal signal handler change
- * has a race.
- * Note: now we have only single thread, therefore both sigprocmask() and
- * pthread_sigmask() makes the same effect.
- */
- sigfillset(&fullmask);
- pthread_sigmask(SIG_BLOCK, &fullmask, &mask);
-#endif
+ rb_disable_interrupt();
oldfunc = ruby_signal(sig, SIG_DFL);
if (oldfunc != SIG_DFL && oldfunc != SIG_IGN) {
ruby_signal(sig, oldfunc);
} else {
GET_VM()->trap_list[sig].cmd = 0;
}
-
-#if USE_TRAP_MASK
- sigdelset(&mask, sig);
- pthread_sigmask(SIG_SETMASK, &mask, NULL);
-#endif
+ rb_enable_interrupt();
}
#endif