com php-src: work on #46 (handle quit local consoles gracefully): phpdbg.c
| From: | Bob Weinand | Date: | Sun, 12 Jan 2014 16:48:10 +0000 |
| Subject: | com php-src: work on #46 (handle quit local consoles gracefully): phpdbg.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-75676@lists.php.net to get a copy of this message | ||
Commit: 7d51e47eda97a6570ebebfc8e0d512e7575443a6
Author: krakjoe <joe.watkins@live.co.uk> Sun, 12 Jan 2014 16:48:10 +0000
Parents: 2712d7e2248ab91015502d648c9c65d8e5627e69
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7d51e47eda97a6570ebebfc8e0d512e7575443a6
Log:
work on #46 (handle quit local consoles gracefully)
Bugs:
https://bugs.php.net/46
Changed paths:
M phpdbg.c
Diff:
diff --git a/phpdbg.c b/phpdbg.c
index 481a181..1ada36c 100644
--- a/phpdbg.c
+++ b/phpdbg.c
@@ -1243,18 +1243,25 @@ phpdbg_interact:
#ifndef _WIN32
/* remote client disconnected */
if ((PHPDBG_G(flags) & PHPDBG_IS_DISCONNECTED)) {
-
- /* renegociate connections */
- phpdbg_open_sockets(
- address, listen, &server, &socket, streams);
- /* set streams */
- if (streams[0] && streams[1]) {
- PHPDBG_G(flags) &= ~PHPDBG_IS_QUITTING;
+ if (PHPDBG_G(flags) & PHPDBG_IS_REMOTE) {
+ /* renegociate connections */
+ phpdbg_open_sockets(
+ address, listen, &server, &socket, streams);
+
+ /* set streams */
+ if (streams[0] && streams[1]) {
+ PHPDBG_G(flags) &= ~PHPDBG_IS_QUITTING;
+ }
+
+ /* this must be forced */
+ CG(unclean_shutdown) = 0;
+ } else {
+ /* local client quit console */
+ CG(unclean_shutdown) = 0;
+
+ goto phpdbg_out;
}
-
- /* this must be forced */
- CG(unclean_shutdown) = 0;
}
#endif
if (PHPDBG_G(flags) & PHPDBG_IS_QUITTING) {