{{ message }}
Repository navigation
Conversation
Contributor
Author
hktitof
force-pushed
the
fix/spawn-signal-listener-dispose
branch
3 times, most recently
from
September 22, 2026 15:37
292b75f to
a155af9
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #66189 +/- ##
=======================================
Coverage 90.39% 90.39%
=======================================
Files 792 792
Lines 275697 275700 +3
Branches 52868 52858 -10
=======================================
+ Hits 249208 249228 +20
+ Misses 16892 16888 -4
+ Partials 9597 9584 -13 🚀 New features to boost your workflow:
|
hktitof
force-pushed
the
fix/spawn-signal-listener-dispose
branch
from
October 1, 2026 09:22
a155af9 to
24374f1
Compare
A failed spawn emits 'error' and 'close' but never 'exit'. The AbortSignal cleanup in spawn() was registered on 'exit', so the abort listener stayed attached to the user's signal after a failed spawn. Register the cleanup on 'close' as well, matching the timeout cleanup. Signed-off-by: Abdel <hktitof@gmail.com>
hktitof
force-pushed
the
fix/spawn-signal-listener-dispose
branch
from
October 8, 2026 18:42
24374f1 to
4376701
Compare
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.

Description
A failed spawn emits 'error' and 'close' but never 'exit'. The timeout cleanup got fixed by #65506 for exactly this, but the AbortSignal dispose still sits only on 'exit', so after a failed spawn the abort listener stays attached to the user's signal
probed on a pristine main build (67a4416): after the 'error' of a failed spawn, the signal still carries the abort listener, and 'exit' never fires while 'close' does
this keeps the dispose on 'exit' (so the timing the existing test in test-child-process-spawn-timeout-kill-signal.js pins is untouched) and adds a second dispose on 'close', which always fires. Removing an already removed listener is a no-op, so the success path behaves exactly as before
Validation
the test joins test-child-process-spawn-timeout-clear-on-error.js, the file #65506 added
raw output on a pristine main build (the new assertion fails bcs the listener is still attached):
with the fix (exit code 0, no output), plus the spawn and abort signal files around the change:
Note: Just to let you knmow that I have used AI assistance to help check the sibling pattern from #65506, but tested and verified all changes locally myself on main build 67a4416