summaryrefslogtreecommitdiff
path: root/ext/pcntl/php_signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pcntl/php_signal.c')
-rw-r--r--ext/pcntl/php_signal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/pcntl/php_signal.c b/ext/pcntl/php_signal.c
index 00ab6b425f..2985728759 100644
--- a/ext/pcntl/php_signal.c
+++ b/ext/pcntl/php_signal.c
@@ -41,8 +41,14 @@ Sigfunc *php_signal4(int signo, Sigfunc *func, int restart, int mask_all)
act.sa_flags |= SA_RESTART; /* SVR4, 4.3+BSD */
#endif
}
+#ifdef ZEND_SIGNALS
+ if (zend_sigaction(signo, &act, &oact) < 0)
+#else
if (sigaction(signo, &act, &oact) < 0)
+#endif
+ {
return SIG_ERR;
+ }
return oact.sa_handler;
}