summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--sapi/cli/php_cli.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 9093eb7308..045e191b3e 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ PHP NEWS
- Core:
. Fixed bug #79595 (zend_init_fpu() alters FPU precision). (cmb, Nikita)
+ . Fixed bug #79650 (php-win.exe 100% cpu lockup). (cmb)
- phpdbg:
. Fixed bug #73926 (phpdbg will not accept input on restart execution). (cmb)
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 1b14b7586b..91f400aca4 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -266,6 +266,9 @@ PHP_CLI_API ssize_t sapi_cli_single_write(const char *str, size_t str_length) /*
} while (ret <= 0 && errno == EAGAIN && sapi_cli_select(STDOUT_FILENO));
#else
ret = fwrite(str, 1, MIN(str_length, 16384), stdout);
+ if (ret == 0 && ferror(stdout)) {
+ return -1;
+ }
#endif
return ret;
}