Skip to content

Commit b9bf9ee

Browse files
committed
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1: Fix interrupted CLI output causing the process to exit
2 parents 7f9ad4a + 1111a95 commit b9bf9ee

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 8.2.9
44

5+
- CLI:
6+
. Fix interrupted CLI output causing the process to exit. (nielsdos)
7+
58
- PDO SQLite:
69
. Fix GH-11492 (Make test failure: ext/pdo_sqlite/tests/bug_42589.phpt).
710
(KapitanOczywisty, CViniciusSDias)

sapi/cli/php_cli.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ PHP_CLI_API ssize_t sapi_cli_single_write(const char *str, size_t str_length) /*
263263
#ifdef PHP_WRITE_STDOUT
264264
do {
265265
ret = write(STDOUT_FILENO, str, str_length);
266-
} while (ret <= 0 && errno == EAGAIN && sapi_cli_select(STDOUT_FILENO));
266+
} while (ret <= 0 && (errno == EINTR || (errno == EAGAIN && sapi_cli_select(STDOUT_FILENO))));
267267
#else
268268
ret = fwrite(str, 1, MIN(str_length, 16384), stdout);
269269
if (ret == 0 && ferror(stdout)) {

0 commit comments

Comments
 (0)