summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-08-16 16:02:49 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-08-16 16:02:49 +0900
commit07b12a1f4829ca3c7d60d56bb5c89069f0758d4c (patch)
treeeae3eda66d304d5604af1fd28086e9612224025f /process.c
parentee7bd7d7325d670c5bb204a63dc845465ca3f96a (diff)
Suppress unused-variable warnings
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4745
Diffstat (limited to 'process.c')
-rw-r--r--process.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/process.c b/process.c
index dc2dcf9560..22fa8bd15c 100644
--- a/process.c
+++ b/process.c
@@ -4088,10 +4088,10 @@ struct child_handler_disabler_state
static void
disable_child_handler_before_fork(struct child_handler_disabler_state *old)
{
+#ifdef HAVE_PTHREAD_SIGMASK
int ret;
sigset_t all;
-#ifdef HAVE_PTHREAD_SIGMASK
ret = sigfillset(&all);
if (ret == -1)
rb_sys_fail("sigfillset");
@@ -4108,9 +4108,9 @@ disable_child_handler_before_fork(struct child_handler_disabler_state *old)
static void
disable_child_handler_fork_parent(struct child_handler_disabler_state *old)
{
+#ifdef HAVE_PTHREAD_SIGMASK
int ret;
-#ifdef HAVE_PTHREAD_SIGMASK
ret = pthread_sigmask(SIG_SETMASK, &old->sigmask, NULL); /* not async-signal-safe */
if (ret != 0) {
rb_syserr_fail(ret, "pthread_sigmask");