Skip to content

fix(ext/node): fix AbortController signal handling in child_process s…#32713

Merged
fraidev merged 1 commit intodenoland:mainfrom
fraidev:fix/child-process-abort-signal
Mar 14, 2026
Merged

fix(ext/node): fix AbortController signal handling in child_process s…#32713
fraidev merged 1 commit intodenoland:mainfrom
fraidev:fix/child-process-abort-signal

Conversation

@fraidev
Copy link
Contributor

@fraidev fraidev commented Mar 14, 2026

Two bugs in the abort listener for child_process.spawn():

  1. Hardcoded "SIGKILL" instead of using the killSignal option (default "SIGTERM"), causing wrong signal to be sent to child.

  2. AbortError was created without passing signal.reason as cause, so controller.abort(new Error('boom')) lost the abort reason.

Also fixes test-child-process-fork-abort-signal.js which had the same root cause.

…pawn

Two bugs in the abort listener for child_process.spawn():

1. Hardcoded "SIGKILL" instead of using the killSignal option
   (default "SIGTERM"), causing wrong signal to be sent to child.

2. AbortError was created without passing signal.reason as cause,
   so controller.abort(new Error('boom')) lost the abort reason.

Also fixes test-child-process-fork-abort-signal.js which had the
same root cause.
@fraidev fraidev merged commit 368c99d into denoland:main Mar 14, 2026
112 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants