diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-07-23 10:38:23 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-07-29 15:17:32 +0200 |
commit | 38f1288b6427fc9e2fa2b5ad9912745ded923ee7 (patch) | |
tree | 65df8f768367df986838b6dc72dfd7a33ee59c79 /main/main.c | |
parent | 68fd435ba81e0208d30218b0558cccbf76b85e49 (diff) | |
download | php-git-38f1288b6427fc9e2fa2b5ad9912745ded923ee7.tar.gz |
Fix Zend signals unblocking
There are a few parts here:
* opcache should not be blocking signals while invoking compile_file,
otherwise signals may remain blocked on a compile error. While at
it, also protect SHM memory during compile_file.
* We should deactivate Zend signals at the end of the request, to make
sure that we gracefully recover from a missing unblock and signals
don't remain blocked forever.
* We don't use a critical section in deactivation, because it should
not be necessary. Additionally we want to clean up the signal queue,
if it is non-empty.
* Enable SIGG(check) in debug builds so we notice issues in the future.
Diffstat (limited to 'main/main.c')
-rw-r--r-- | main/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/main/main.c b/main/main.c index d68cb6eca4..37d520ec34 100644 --- a/main/main.c +++ b/main/main.c @@ -1932,6 +1932,11 @@ void php_request_shutdown(void *dummy) zend_unset_timeout(); } zend_end_try(); + /* 17. Deactivate Zend signals */ +#ifdef ZEND_SIGNALS + zend_signal_deactivate(); +#endif + #ifdef PHP_WIN32 if (PG(com_initialized)) { CoUninitialize(); |