Skip to content

Commit 231a1c4

Browse files
committed
issues raised in #46, don't quit on CTRL+C if not executing
1 parent c645e50 commit 231a1c4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Diff for: phpdbg.c

+8-2
Original file line numberDiff line numberDiff line change
@@ -654,8 +654,11 @@ static inline void phpdbg_sigint_handler(int signo) /* {{{ */
654654
PHPDBG_G(flags) |= PHPDBG_IS_SIGNALED;
655655
}
656656
} else {
657-
PHPDBG_G(flags) |= PHPDBG_IS_QUITTING;
658-
zend_bailout();
657+
/* we quit remote consoles on recv SIGINT */
658+
if (PHPDBG_G(flags) & PHPDBG_IS_REMOTE) {
659+
PHPDBG_G(flags) |= PHPDBG_IS_QUITTING;
660+
zend_bailout();
661+
}
659662
}
660663
} /* }}} */
661664

@@ -1271,6 +1274,9 @@ int main(int argc, char **argv) /* {{{ */
12711274
/* this must be forced */
12721275
CG(unclean_shutdown) = 0;
12731276

1277+
/* this is just helpful */
1278+
PG(report_memleaks) = 0;
1279+
12741280
phpdbg_out:
12751281
#ifndef _WIN32
12761282
if ((PHPDBG_G(flags) & PHPDBG_IS_DISCONNECTED)) {

0 commit comments

Comments
 (0)