[php-src] PR #25206: Fix GH-25204: False EOF on an idle pipe on Windows

From: Date: Thu, 05 Nov 2026 12:58:41 +0000
Subject: [php-src] PR #25206: Fix GH-25204: False EOF on an idle pipe on Windows
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-40320@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/25206 Author: lazerg On Windows, php_stdiop_read() polls a non-blocking pipe with PeekNamedPipe() and usleep(10) for a bounded number of rounds. When that wait runs out on a pipe that is still open, count drops to 0, read() returns 0 and the stream gets marked as EOF. Since usleep(10) is ~15ms on Windows, this hits a silent STDIN after about 13.5 hours and the CLI process just ends. Now a wait that runs out while PeekNamedPipe() still succeeds returns 0 without setting eof, so the read still comes back empty but feof() stays false. A broken pipe still makes PeekNamedPipe() fail and ends in EOF as before. This is the change suggested in the issue. No test, since it would need to wait out the full loop. Fixes #25204

« previous php.git-pulls (#40320) next »