]> granicus.if.org Git - php/commitdiff
issues raised in #46, don't quit on CTRL+C if not executing
authorkrakjoe <joe.watkins@live.co.uk>
Mon, 13 Jan 2014 20:16:50 +0000 (20:16 +0000)
committerkrakjoe <joe.watkins@live.co.uk>
Mon, 13 Jan 2014 20:16:50 +0000 (20:16 +0000)
phpdbg.c

index c631d8f3c3ac61f2bd24c3f4138f0ab4b261bc80..1e69e4bdbf016f16361d99fb690daf165f27fc2d 100644 (file)
--- a/phpdbg.c
+++ b/phpdbg.c
@@ -654,8 +654,11 @@ static inline void phpdbg_sigint_handler(int signo) /* {{{ */
                        PHPDBG_G(flags) |= PHPDBG_IS_SIGNALED;
                }
        } else {
-               PHPDBG_G(flags) |= PHPDBG_IS_QUITTING;
-               zend_bailout();
+               /* we quit remote consoles on recv SIGINT */
+               if (PHPDBG_G(flags) & PHPDBG_IS_REMOTE) {
+                       PHPDBG_G(flags) |= PHPDBG_IS_QUITTING;
+                       zend_bailout();
+               }
        }
 } /* }}} */
 
@@ -1271,6 +1274,9 @@ phpdbg_interact:
                /* this must be forced */
                CG(unclean_shutdown) = 0;
                
+               /* this is just helpful */
+               PG(report_memleaks) = 0;
+               
 phpdbg_out:
 #ifndef _WIN32
                if ((PHPDBG_G(flags) & PHPDBG_IS_DISCONNECTED)) {