mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.2'
* PHP-8.2: Fix interrupted CLI output causing the process to exit
This commit is contained in:
commit
d8ee89d3fa
1 changed files with 1 additions and 1 deletions
|
@ -263,7 +263,7 @@ PHP_CLI_API ssize_t sapi_cli_single_write(const char *str, size_t str_length) /*
|
|||
#ifdef PHP_WRITE_STDOUT
|
||||
do {
|
||||
ret = write(STDOUT_FILENO, str, str_length);
|
||||
} while (ret <= 0 && errno == EAGAIN && sapi_cli_select(STDOUT_FILENO));
|
||||
} while (ret <= 0 && (errno == EINTR || (errno == EAGAIN && sapi_cli_select(STDOUT_FILENO))));
|
||||
#else
|
||||
ret = fwrite(str, 1, MIN(str_length, 16384), stdout);
|
||||
if (ret == 0 && ferror(stdout)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue