summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg.c
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2016-07-13 01:05:32 +0200
committerBob Weinand <bobwei9@hotmail.com>2016-07-13 01:05:32 +0200
commit7a125a44099fefbb1017c7b939385152cae71846 (patch)
tree6ce7ea2b5175c7e4cc5f315ddf9a88065aec51d6 /sapi/phpdbg/phpdbg.c
parentd08cb90462d6a1339d216e6122be55ee55c3f9d8 (diff)
downloadphp-git-7a125a44099fefbb1017c7b939385152cae71846.tar.gz
Remove bogus zend_signal_shutdown symbol from header
Diffstat (limited to 'sapi/phpdbg/phpdbg.c')
-rw-r--r--sapi/phpdbg/phpdbg.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index d851e0b082..1e0b214a23 100644
--- a/sapi/phpdbg/phpdbg.c
+++ b/sapi/phpdbg/phpdbg.c
@@ -1738,7 +1738,7 @@ phpdbg_main:
/* setup io here */
if (remote) {
PHPDBG_G(flags) |= PHPDBG_IS_REMOTE;
- signal(SIGPIPE, SIG_IGN);
+ zend_signal(SIGPIPE, SIG_IGN);
}
PHPDBG_G(io)[PHPDBG_STDIN].ptr = stdin;
PHPDBG_G(io)[PHPDBG_STDIN].fd = fileno(stdin);
@@ -1968,6 +1968,10 @@ phpdbg_out:
zend_objects_store_mark_destructed(&EG(objects_store));
}
+ zend_try {
+ php_request_shutdown(NULL);
+ } zend_end_try();
+
/* backup globals when cleaning */
if ((cleaning > 0 || remote) && !quit_immediately) {
settings = calloc(1, sizeof(zend_phpdbg_globals));
@@ -1995,10 +1999,6 @@ phpdbg_out:
}
}
- zend_try {
- php_request_shutdown(NULL);
- } zend_end_try();
-
if (exit_status == 0) {
exit_status = EG(exit_status);
}
@@ -2020,6 +2020,7 @@ phpdbg_out:
} zend_end_try();
#ifndef _WIN32
+ /* force override (no zend_signals) to prevent crashes due to signal recursion in SIGSEGV/SIGBUS handlers */
signal(SIGSEGV, SIG_DFL);
signal(SIGBUS, SIG_DFL);
@@ -2038,8 +2039,6 @@ phpdbg_out:
free(sapi_name);
}
- zend_signal_shutdown();
-
#ifdef ZTS
tsrm_shutdown();
#endif