Conversation
|
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. |
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: Found potentially related PRs:
Both PRs address similar root causes related to child processes not firing close events properly. #26147 in particular seems to be a very similar fix to the current PR #28336. You may want to check if #26147 was previously closed/merged and if this is a reopened or updated version of that fix. |
|
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
Why
Commands such as Gradle / dotnet / hvigor can finish successfully while a daemon or grandchild process still holds inherited stdout/stderr handles open. In that case Node's close event may be delayed indefinitely even though exit has already fired, which leaves shell/task execution stuck waiting for handle.exitCode.
This patch keeps existing behavior when close arrives promptly, but falls back to the cached exit result after 2 seconds when close never arrives.
Related
Testing