diff options
author | Felipe Pena <felipe@php.net> | 2011-06-03 00:35:22 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2011-06-03 00:35:22 +0000 |
commit | 0aaedef71d0cf3bbce5d211ce2845faf92dc78be (patch) | |
tree | c755cf3f5e820b339fc3ec071f3491d9d898fe7e | |
parent | 398c0b9dadbb4e110525567864e6e92168372bc7 (diff) | |
download | php-git-0aaedef71d0cf3bbce5d211ce2845faf92dc78be.tar.gz |
- Fix crash in pcntl
-rw-r--r-- | ext/pcntl/php_signal.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/pcntl/php_signal.c b/ext/pcntl/php_signal.c index 2985728759..2e5ce95316 100644 --- a/ext/pcntl/php_signal.c +++ b/ext/pcntl/php_signal.c @@ -18,6 +18,7 @@ /* $Id$ */ +#include "TSRM.h" #include "php_signal.h" /* php_signal using sigaction is derrived from Advanced Programing @@ -25,6 +26,9 @@ Sigfunc *php_signal4(int signo, Sigfunc *func, int restart, int mask_all) { struct sigaction act,oact; +#ifdef ZEND_SIGNALS + TSRMLS_FETCH(); +#endif act.sa_handler = func; if (mask_all) { sigfillset(&act.sa_mask); @@ -42,7 +46,7 @@ Sigfunc *php_signal4(int signo, Sigfunc *func, int restart, int mask_all) #endif } #ifdef ZEND_SIGNALS - if (zend_sigaction(signo, &act, &oact) < 0) + if (zend_sigaction(signo, &act, &oact TSRMLS_CC) < 0) #else if (sigaction(signo, &act, &oact) < 0) #endif |