summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg.c
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2015-09-17 22:52:55 +0200
committerBob Weinand <bobwei9@hotmail.com>2015-09-17 22:53:10 +0200
commitadcabcc125094dae8fe1b62dca267e3fa302907d (patch)
tree28a53d475349c3b57b8d2fd2d26afec350b17d9b /sapi/phpdbg/phpdbg.c
parent8fe171a3e046717ec0109297bcd765bdee3e939c (diff)
downloadphp-git-adcabcc125094dae8fe1b62dca267e3fa302907d.tar.gz
Add # delimiter to phpdbg commands
Diffstat (limited to 'sapi/phpdbg/phpdbg.c')
-rw-r--r--sapi/phpdbg/phpdbg.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index a8247844c8..2d3a97a1a8 100644
--- a/sapi/phpdbg/phpdbg.c
+++ b/sapi/phpdbg/phpdbg.c
@@ -1244,6 +1244,11 @@ void phpdbg_signal_handler(int sig, siginfo_t *info, void *context) /* {{{ */
} /* }}} */
#endif
+void phpdbg_sighup_handler(int sig) /* {{{ */
+{
+ exit(0);
+} /* }}} */
+
void *phpdbg_malloc_wrapper(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) /* {{{ */
{
return _zend_mm_alloc(zend_mm_get_heap(), size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
@@ -1613,6 +1618,11 @@ phpdbg_main:
/* set remote flag to stop service shutting down upon quit */
remote = 1;
+#ifndef _WIN32
+ } else {
+
+ signal(SIGHUP, phpdbg_sighup_handler);
+#endif
}
mm_heap = zend_mm_get_heap();