summaryrefslogtreecommitdiff
path: root/signal.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-21 13:39:24 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-21 13:39:24 +0000
commit682a661e1c4d536f38c12e5f4613e4107e10c75b (patch)
treebb578b1af9046a46c8934e487fda6126b2e3b9a8 /signal.c
parentc8a34443c00d019a9bc44155c639bc55d2272db0 (diff)
Re-Revert "Temporary revert "process.c: dead code when no SIGCHLD""
This re-reverts commit r64447. The issue was machine side problem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/signal.c b/signal.c
index 013425bfb6..326179f383 100644
--- a/signal.c
+++ b/signal.c
@@ -531,7 +531,9 @@ static struct {
rb_atomic_t cnt[RUBY_NSIG];
rb_atomic_t size;
} signal_buff;
+#if RUBY_SIGCHLD
volatile unsigned int ruby_nocldwait;
+#endif
#ifdef __dietlibc__
#define sighandler_t sh_t
@@ -615,7 +617,8 @@ ruby_signal(int signum, sighandler_t handler)
#endif
switch (signum) {
- case SIGCHLD:
+#if RUBY_SIGCHLD
+ case RUBY_SIGCHLD:
if (handler == SIG_IGN) {
ruby_nocldwait = 1;
if (sigact.sa_flags & SA_SIGINFO) {
@@ -629,6 +632,7 @@ ruby_signal(int signum, sighandler_t handler)
ruby_nocldwait = 0;
}
break;
+#endif
#if defined(SA_ONSTACK) && defined(USE_SIGALTSTACK)
case SIGSEGV:
#ifdef SIGBUS