diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2011-06-02 21:16:50 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2011-06-02 21:16:50 +0000 |
commit | 939875133a2c389d621a9999a8ede3ddbc9b6637 (patch) | |
tree | 110835541d96f1f8cbb147c36ae6d7d023790933 /ext/pcntl/php_signal.c | |
parent | e87534b01715d8da78f96f72f6127de67664b2a0 (diff) | |
download | php-git-939875133a2c389d621a9999a8ede3ddbc9b6637.tar.gz |
Zend Signal Handling (see RFC: https://wiki.php.net/rfc/zendsignals)
This needs to go into 5.4 as well, but will wait for Pierre to review win32 situation
# Patch by Lucas Nealan, Arnaud Le Blanc, Brian Shire & Ilia Alshanetsky
Diffstat (limited to 'ext/pcntl/php_signal.c')
-rw-r--r-- | ext/pcntl/php_signal.c | 6 |
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; } |