summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorMickaƫl <mickael9@gmail.com>2016-01-09 04:54:02 +0100
committerXinchen Hui <laruence@gmail.com>2016-02-15 13:23:37 +0800
commit0c2e184eac4cc9c922c5668241b46f73e8bbf617 (patch)
tree534accb92b82f64e48913ac284399f9f4af89844 /sapi
parent0e363e90a4cc3dd5983d0aaaf7f3d1c6b37a0cee (diff)
downloadphp-git-0c2e184eac4cc9c922c5668241b46f73e8bbf617.tar.gz
fpm: call zend_signal_init() in child
This addresses bug #71269. When an fpm child handles more than one request, zend_signal_startup() will override the saved signal handlers with the internal zend handlers set from the previous request, causing a SIGQUIT signal to result in a core dump rather than gracefully exiting (the expected behaviour). This is fixed by adding a call to zend_signal_init() after setting the signal handlers in the child. The same technique is used in the apache SAPI module in commit fd5a756ad44124ffa7e9a5810a31ff49e91708cf which addresses bug #61083.
Diffstat (limited to 'sapi')
-rw-r--r--sapi/fpm/fpm/fpm_signals.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sapi/fpm/fpm/fpm_signals.c b/sapi/fpm/fpm/fpm_signals.c
index c5d0692f18..a637e69e71 100644
--- a/sapi/fpm/fpm/fpm_signals.c
+++ b/sapi/fpm/fpm/fpm_signals.c
@@ -241,6 +241,10 @@ int fpm_signals_init_child() /* {{{ */
zlog(ZLOG_SYSERROR, "failed to init child signals: sigaction()");
return -1;
}
+
+#ifdef ZEND_SIGNALS
+ zend_signal_init();
+#endif
return 0;
}
/* }}} */