Support for builds without ZEND_SIGNALS

This commit is contained in:
Dmitry Stogov 2018-10-26 00:19:40 +03:00
parent e6b76ecb4b
commit 3a2d1bcc1f

View File

@ -3817,7 +3817,9 @@ static int accel_finish_startup(void)
int (*orig_send_headers)(sapi_headers_struct *sapi_headers TSRMLS_DC) = sapi_module.send_headers;
void (*orig_send_header)(sapi_header_struct *sapi_header, void *server_context TSRMLS_DC)= sapi_module.send_header;
char *(*orig_getenv)(char *name, size_t name_len TSRMLS_DC) = sapi_module.getenv;
#ifdef ZEND_SIGNALS
zend_bool old_reset_signals = SIGG(reset);
#endif
if (UNEXPECTED(file_cache_only)) {
zend_accel_error(ACCEL_LOG_WARNING, "Preloading doesn't work in \"file_cache_only\" mode");
@ -3834,7 +3836,9 @@ static int accel_finish_startup(void)
zend_interned_strings_switch_storage(1);
#ifdef ZEND_SIGNALS
SIGG(reset) = 0;
#endif
if (php_request_startup() == SUCCESS) {
/* don't send headers */
@ -3861,7 +3865,9 @@ static int accel_finish_startup(void)
} else {
ret = FAILURE;
}
#ifdef ZEND_SIGNALS
SIGG(reset) = old_reset_signals;
#endif
sapi_module.activate = orig_activate;
sapi_module.deactivate = orig_deactivate;