Merge branch 'PHP-8.1' into PHP-8.2

* PHP-8.1:
  Fix interrupted CLI output causing the process to exit
This commit is contained in:
nielsdos 2023-06-23 17:42:32 +02:00
commit b9bf9ee2cb
2 changed files with 4 additions and 1 deletions

3
NEWS
View file

@ -2,6 +2,9 @@ PHP NEWS
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.2.9 ?? ??? ????, PHP 8.2.9
- CLI:
. Fix interrupted CLI output causing the process to exit. (nielsdos)
- PDO SQLite: - PDO SQLite:
. Fix GH-11492 (Make test failure: ext/pdo_sqlite/tests/bug_42589.phpt). . Fix GH-11492 (Make test failure: ext/pdo_sqlite/tests/bug_42589.phpt).
(KapitanOczywisty, CViniciusSDias) (KapitanOczywisty, CViniciusSDias)

View file

@ -263,7 +263,7 @@ PHP_CLI_API ssize_t sapi_cli_single_write(const char *str, size_t str_length) /*
#ifdef PHP_WRITE_STDOUT #ifdef PHP_WRITE_STDOUT
do { do {
ret = write(STDOUT_FILENO, str, str_length); 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 #else
ret = fwrite(str, 1, MIN(str_length, 16384), stdout); ret = fwrite(str, 1, MIN(str_length, 16384), stdout);
if (ret == 0 && ferror(stdout)) { if (ret == 0 && ferror(stdout)) {