Skip to content

Commit

Permalink
Remove bogus zend_signal_shutdown symbol from header
Browse files Browse the repository at this point in the history
  • Loading branch information
bwoebi committed Jul 12, 2016
1 parent d08cb90 commit 7a125a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 0 additions & 2 deletions Zend/zend_signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ void zend_signal_activate(void);
void zend_signal_deactivate(void);
void zend_signal_startup(void);
void zend_signal_init(void);
void zend_signal_shutdown(void);

ZEND_API int zend_signal(int signo, void (*handler)(int));
ZEND_API int zend_sigaction(int signo, const struct sigaction *act, struct sigaction *oldact);
Expand All @@ -104,7 +103,6 @@ ZEND_API int zend_sigaction(int signo, const struct sigaction *act, struct sigac
# define zend_signal_deactivate()
# define zend_signal_startup()
# define zend_signal_init()
# define zend_signal_shutdown()

# define zend_signal(signo, handler) signal(signo, handler)
# define zend_sigaction(signo, act, oldact) sigaction(signo, act, oldact)
Expand Down
13 changes: 6 additions & 7 deletions sapi/phpdbg/phpdbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1738,7 +1738,7 @@ int main(int argc, char **argv) /* {{{ */
/* 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);
Expand Down Expand Up @@ -1968,6 +1968,10 @@ int main(int argc, char **argv) /* {{{ */
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));
Expand Down Expand Up @@ -1995,10 +1999,6 @@ int main(int argc, char **argv) /* {{{ */
}
}

zend_try {
php_request_shutdown(NULL);
} zend_end_try();

if (exit_status == 0) {
exit_status = EG(exit_status);
}
Expand All @@ -2020,6 +2020,7 @@ int main(int argc, char **argv) /* {{{ */
} 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);

Expand All @@ -2038,8 +2039,6 @@ int main(int argc, char **argv) /* {{{ */
free(sapi_name);
}

zend_signal_shutdown();

#ifdef ZTS
tsrm_shutdown();
#endif
Expand Down

0 comments on commit 7a125a4

Please sign in to comment.