Skip to content

Commit

Permalink
Support for builds without ZEND_SIGNALS
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Oct 25, 2018
1 parent e6b76ec commit 3a2d1bc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ext/opcache/ZendAccelerator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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 */
Expand All @@ -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;
Expand Down

0 comments on commit 3a2d1bc

Please sign in to comment.