summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--signal.c13
2 files changed, 10 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index f574aac28e..11e135309e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Sun Oct 22 14:48:31 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * 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.
+
Sun Oct 22 16:47:56 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
* string.c (rb_str_substr): should be infected with only original
diff --git a/signal.c b/signal.c
index 8bf191ebdd..9bc8a7d6c6 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