]> granicus.if.org Git - php/commitdiff
Fixed endless loop in cli when ignore_user_abort is on
authorArnaud Le Blanc <lbarnaud@php.net>
Tue, 25 Nov 2008 03:49:21 +0000 (03:49 +0000)
committerArnaud Le Blanc <lbarnaud@php.net>
Tue, 25 Nov 2008 03:49:21 +0000 (03:49 +0000)
sapi/cli/php_cli.c

index ec80cd32d16f76b6bb604dc5636cfb1873f56220..bc50e1b6880b129d5685eb2a92a329f99a88f760 100644 (file)
@@ -264,11 +264,10 @@ static int sapi_cli_ub_write(const char *str, uint str_length TSRMLS_DC) /* {{{
        {
                ret = sapi_cli_single_write(ptr, remaining);
                if (!ret) {
-#ifdef PHP_CLI_WIN32_NO_CONSOLE
-                       break;
-#else
+#ifndef PHP_CLI_WIN32_NO_CONSOLE
                        php_handle_aborted_connection();
 #endif
+                       break;
                }
                ptr += ret;
                remaining -= ret;