Skip to content

lib: add signalMonitor event for process#62975

Open
theanarkh wants to merge 1 commit intonodejs:mainfrom
theanarkh:add_signal_describer
Open

lib: add signalMonitor event for process#62975
theanarkh wants to merge 1 commit intonodejs:mainfrom
theanarkh:add_signal_describer

Conversation

@theanarkh
Copy link
Copy Markdown
Contributor

fixed : #62909

  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added events Issues and PRs related to the events subsystem / EventEmitter. needs-ci PRs that need a full CI run. labels Apr 26, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.64%. Comparing base (c202696) to head (afe1a20).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #62975      +/-   ##
==========================================
- Coverage   89.66%   89.64%   -0.03%     
==========================================
  Files         706      706              
  Lines      219416   219414       -2     
  Branches    42073    42076       +3     
==========================================
- Hits       196738   196687      -51     
- Misses      14576    14647      +71     
+ Partials     8102     8080      -22     
Files with missing lines Coverage Δ
lib/events.js 99.60% <100.00%> (+<0.01%) ⬆️

... and 50 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ChALkeR ChALkeR added the semver-minor PRs that contain new features and should be released in the next minor version. label Apr 27, 2026
@yminod
Copy link
Copy Markdown

yminod commented Apr 27, 2026

I tested this change on both Windows and macOS.

With only process.on('signalMonitor', ...) registered, pressing Ctrl+C exits immediately and the signalMonitor listener does not run. By contrast, process.emit('SIGINT') does trigger signalMonitor.

As I understand it, signalMonitor seems to observe synthetic signal emission such as process.emit(), but not the Ctrl+C / OS-delivered signal path by itself.

Because of that, I don't think this resolves #62909 yet. The issue there is about passively observing real signal delivery without installing an active signal handler, so I think the test should cover an actual signal-delivery path, not only process.emit().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

events Issues and PRs related to the events subsystem / EventEmitter. needs-ci PRs that need a full CI run. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add passive signal observers

4 participants