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

index 86d7ed020954daa49a2563c830f6214c8b3de052..3d7de7d08c60165512328d17ef9a6460178c63ba 100644 (file)
@@ -260,11 +260,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;