{{ message }}
Repository navigation
Conversation
A spawn failure emits 'error' without 'exit', so a timeout timer cleared only on 'exit' stayed armed and kept the event loop alive for the whole timeout. Clear it on 'close', which is emitted in both cases, as exec() already does. Fixes: nodejs#65504 Signed-off-by: Avocado <ujubongbong@gmail.com>
Contributor
Member
|
Duplicate of #65506 |
Contributor
Author
|
Sorry for the noise, I missed #65506 when checking for existing work. Closing it. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #65929 +/- ##
==========================================
+ Coverage 90.17% 90.19% +0.02%
==========================================
Files 771 771
Lines 265407 265451 +44
Branches 50441 50460 +19
==========================================
+ Hits 239322 239416 +94
+ Misses 17029 16986 -43
+ Partials 9056 9049 -7 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

spawn()with atimeouthangs for the full timeout when the child fails to spawn.The timer is cleared on
'exit', but a spawn failure getsexitCode < 0inonexitand emits'error'instead, so the timer stays armed and holds the event loop open.'close'is emitted in both cases, andexec()already clears its timer from both'close'and'error'. Switching the listener to'close'covers the failure path without changing the success path.The added test asserts on
process.getActiveResourcesInfo()rather than elapsed time, so it does not depend on timing.Fixes: #65504