summaryrefslogtreecommitdiff
path: root/signal.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-22 08:01:13 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-22 08:01:13 +0000
commit0931ed26641624540ec5b53d4ec86fa88016bb29 (patch)
treee890f2b736eeaf4541fb9039a25192451c732564 /signal.c
parentdd5fe7b203d874dc4961ded9008c782d1b4c026d (diff)
* signal.c (ruby_signal): don't set SA_RESTART. a backport from
the HEAD. [ruby-talk:220937] [ruby-talk:147220] * signal.c (Init_signal): avoid duplicated installation of SIGCHLD handler. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/signal.c b/signal.c
index 8bf191e..9bc8a7d 100644
--- a/signal.c
+++ b/signal.c
@@ -341,14 +341,6 @@ ruby_signal(signum, handler)
sigact.sa_handler = handler;
sigemptyset(&sigact.sa_mask);
sigact.sa_flags = 0;
-# if defined(SA_RESTART)
- /* All other signals but VTALRM shall restart restartable syscall
- VTALRM will cause EINTR to syscall if interrupted.
- */
- if (signum != SIGVTALRM) {
- sigact.sa_flags |= SA_RESTART; /* SVR4, 4.3+BSD */
- }
-# endif
# ifdef SA_NOCLDWAIT
if (signum == SIGCHLD && handler == SIG_IGN)
sigact.sa_flags |= SA_NOCLDWAIT;
@@ -1010,10 +1002,9 @@ Init_signal()
install_sighandler(SIGPIPE, sigpipe);
#endif
-#ifdef SIGCLD
+#if defined(SIGCLD)
init_sigchld(SIGCLD);
-#endif
-#ifdef SIGCHLD
+#elif defined(SIGCHLD)
init_sigchld(SIGCHLD);
#endif