Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(node): track SIG* listeners in process.listeners #23890

Merged
merged 1 commit into from
May 20, 2024

Conversation

marvinhagemeister
Copy link
Contributor

Some npm libraries like signal-exit rely on the length of the listener array returned by process.listeners("SIGNT") to be correct to function. We weren't tracking SIG* events there, which broke those npm libraries.

Fixes #22892

@marvinhagemeister marvinhagemeister merged commit fb3f82b into main May 20, 2024
17 checks passed
@marvinhagemeister marvinhagemeister deleted the node-process-sig branch May 20, 2024 13:24
bartlomieju pushed a commit that referenced this pull request May 21, 2024
Some npm libraries like `signal-exit` rely on the length of the listener
array returned by `process.listeners("SIGNT")` to be correct to
function. We weren't tracking `SIG*` events there, which broke those npm
libraries.

Fixes #22892
bartlomieju pushed a commit that referenced this pull request May 21, 2024
Some npm libraries like `signal-exit` rely on the length of the listener
array returned by `process.listeners("SIGNT")` to be correct to
function. We weren't tracking `SIG*` events there, which broke those npm
libraries.

Fixes #22892
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.

Listeners for SIGINT (and other) signals are not registered in EventEmitter
2 participants