Skip to content

[Process] Fix waitUntil() missing output read by its own status updates - #66620

Merged
nicolas-grekas merged 1 commit into
symfony:6.4from
KalimeroMK:fix-process-waituntil-windows
Oct 5, 2026
Merged

nicolas-grekas merged 1 commit into
symfony:6.4from
KalimeroMK:fix-process-waituntil-windows

Conversation

@KalimeroMK

@KalimeroMK KalimeroMK commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor
Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues Fix #66570
License MIT

waitUntil() reads the pipes through updateStatus() before its loop, and through isRunning() on each iteration on Windows. That output only reached the callback given to start(), so waitUntil() could miss the line it waits for: it then returned false, or waited forever when the child stayed silent. Its callback now receives that output too.

Merge-up to 7.4: drop the #[Group('transient-on-windows')] attribute of testWaitUntilSpecificOutput().

@carsonbot carsonbot added this to the 7.4 milestone Oct 4, 2026
@KalimeroMK
KalimeroMK force-pushed the fix-process-waituntil-windows branch 3 times, most recently from 32d3176 to 6308441 Compare October 4, 2026 20:19
@nicolas-grekas
nicolas-grekas changed the base branch from 7.4 to 6.4 October 5, 2026 04:33
@nicolas-grekas
nicolas-grekas force-pushed the fix-process-waituntil-windows branch from 6308441 to 6bfc8d6 Compare October 5, 2026 04:34
@nicolas-grekas nicolas-grekas modified the milestones: 7.4, 6.4 Oct 5, 2026
@nicolas-grekas nicolas-grekas changed the title [Process] Fix waitUntil() missing output read by isRunning() on Windows [Process] Fix waitUntil() missing output read by its own status updates Oct 5, 2026
@nicolas-grekas

Copy link
Copy Markdown
Member

I rebased on 6.4, where the bug is too, and updated the PR: deterministic tests, the callback restored on every exit path but not after close() released it (iterating the process after a waitUntil() timeout never ended), and testWaitUntilSpecificOutput() back in the Windows runs.

waitUntil() reads the pipes through updateStatus() before its loop, and through isRunning() on each iteration on Windows.
That output only reached the callback given to start(), so waitUntil() could miss the line it waits for.
Its callback now receives that output too, and the callback of start() is restored on every exit path, unless close() released it.
@nicolas-grekas
nicolas-grekas force-pushed the fix-process-waituntil-windows branch from 6bfc8d6 to e727b09 Compare October 5, 2026 04:43
@nicolas-grekas

Copy link
Copy Markdown
Member

Thank you @KalimeroMK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants