Skip to content

Commit 520a403

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Fix #79650: php-win.exe 100% cpu lockup
2 parents b0613d1 + b26ad33 commit 520a403

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sapi/cli/php_cli.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,9 @@ PHP_CLI_API ssize_t sapi_cli_single_write(const char *str, size_t str_length) /*
260260
} while (ret <= 0 && errno == EAGAIN && sapi_cli_select(STDOUT_FILENO));
261261
#else
262262
ret = fwrite(str, 1, MIN(str_length, 16384), stdout);
263+
if (ret == 0 && ferror(stdout)) {
264+
return -1;
265+
}
263266
#endif
264267
return ret;
265268
}

0 commit comments

Comments
 (0)