Uh oh!
There was an error while loading. Please reload this page.
fix: cross-spawn close event hang when grandchild inherits stdio - #43511
fix: cross-spawn close event hang when grandchild inherits stdio#43511amathur2k wants to merge 1 commit into
Conversation
The spawner waited on the "close" event, but on Windows (Start-Process) and POSIX (backgrounded `cmd &`) a detached grandchild can inherit the parent's stdio pipes, so "close" never fires because the fds never see EOF. Fall back to the "exit" result after a short grace period so the process result still resolves. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SmZQhupC6te7razRpvz3gZ
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate Found:
You should check if #42756 is already merged or if it addresses the same issue differently before proceeding with #43511. |
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
Summary
On Windows, the
bashtool blocked until its timeout whenever a spawned grandchild process kept the inherited stdout/stderr pipe open (dev servers, daemons). The spawner waited on thecloseevent, which never fires when a detached grandchild inherits the stdio fds (no EOF). It now falls back to theexitresult after a short grace period so the process result still resolves.I have tested that it removes the fix.
Fixes#32504