feat(ext/signals): support additional signals on Windows#32689
Merged
bartlomieju merged 4 commits intodenoland:mainfrom Mar 17, 2026
Merged
feat(ext/signals): support additional signals on Windows#32689bartlomieju merged 4 commits intodenoland:mainfrom
bartlomieju merged 4 commits intodenoland:mainfrom
Conversation
Add SIGTERM, SIGQUIT, SIGKILL, and SIGABRT to the Windows signal
dictionary, matching libuv's signal support. This enables:
- Deno.addSignalListener("SIGTERM", ...) on Windows
- Deno.addSignalListener("SIGQUIT", ...) on Windows
- Deno.kill(pid, "SIGQUIT") on Windows (terminates process)
- Deno.kill(pid, "SIGINT") on Windows (terminates process)
- Deno.kill(pid, 0) on Windows (health check, like Unix)
SIGKILL and SIGABRT are added to the dictionary for Deno.kill() but
are forbidden for signal listeners (matching Unix behavior where these
are uncatchable/fatal signals).
The Windows kill() function now accepts SIGINT, SIGQUIT, SIGKILL,
SIGTERM, and SIGABRT (all map to TerminateProcess), plus signal 0
for process existence checks.
Also simplifies the error messages to use a single cross-platform
"Invalid signal" format instead of Windows-specific text.
Closes denoland#26331
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
These signals are not in the Windows signal dict, so they error with "Invalid signal" rather than "Binding forbidden". Move them from the forbidden test to the unsupported test. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update JSDoc to reflect newly supported Windows signals: SIGTERM, SIGQUIT, SIGHUP, and SIGWINCH. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
kajukitli
approved these changes
Mar 14, 2026
Contributor
kajukitli
left a comment
There was a problem hiding this comment.
Reviewed the changes. No issues found.
littledivy
approved these changes
Mar 17, 2026
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.
Summary
Deno.addSignalListener("SIGTERM", ...)andDeno.addSignalListener("SIGQUIT", ...)now work on WindowsDeno.kill()on Windows now accepts SIGINT, SIGQUIT, SIGKILL, SIGTERM, SIGABRT (all map toTerminateProcess), plus signal 0 for process health checksCloses #26331
Test plan
tests/unit/signal_test.ts— split the oldsignalsNotImplementedtest intowindowsUnsupportedSignalsTest,windowsForbiddenSignalsTest, andwindowsSupportedSignalsTest./x test-unit signalpasses🤖 Generated with Claude Code