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

src: fix process exit listeners not receiving unsettled tla codes #56872

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

dario-piotrowicz
Copy link
Contributor

@dario-piotrowicz dario-piotrowicz commented Feb 2, 2025

fix listeners registered via process.on('exit', ... not receiving error code 13 when an unsettled top-level-await is encountered in the code

Fixes: #53551

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Feb 2, 2025
@dario-piotrowicz dario-piotrowicz force-pushed the dario/53551/process-on-exit-unsettled-tlas branch from eef4c1f to 80a0041 Compare February 2, 2025 00:35
Copy link

codecov bot commented Feb 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.10%. Comparing base (d1f8ccb) to head (3779a97).
Report is 33 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #56872      +/-   ##
==========================================
- Coverage   89.13%   89.10%   -0.04%     
==========================================
  Files         665      665              
  Lines      193167   193194      +27     
  Branches    37190    37215      +25     
==========================================
- Hits       172185   172142      -43     
- Misses      13731    13763      +32     
- Partials     7251     7289      +38     
Files with missing lines Coverage Δ
lib/internal/bootstrap/node.js 99.57% <100.00%> (-0.01%) ⬇️
src/api/embed_helpers.cc 74.61% <100.00%> (-0.02%) ⬇️
src/api/hooks.cc 84.55% <100.00%> (+0.83%) ⬆️
src/env-inl.h 96.97% <100.00%> (+0.02%) ⬆️
src/env.h 98.14% <ø> (ø)

... and 44 files with indirect coverage changes

Copy link
Member

@joyeecheung joyeecheung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Some comments about the approaches taken.

src/api/hooks.cc Show resolved Hide resolved
@dario-piotrowicz dario-piotrowicz force-pushed the dario/53551/process-on-exit-unsettled-tlas branch from 23428e6 to 549873d Compare February 4, 2025 21:31
fix listeners registered via `process.on('exit', ...` not receiving
error code 13 when an unsettled top-level-await is encountered in
the code
@dario-piotrowicz dario-piotrowicz force-pushed the dario/53551/process-on-exit-unsettled-tlas branch 2 times, most recently from a717cb0 to b456e86 Compare February 9, 2025 18:13
fix listeners registered via `process.on('exit', ...` not receiving
error code 13 when an unsettled top-level-await is encountered in
the code
@dario-piotrowicz dario-piotrowicz force-pushed the dario/53551/process-on-exit-unsettled-tlas branch from b456e86 to 7a48cfd Compare February 9, 2025 19:48
@anonrig anonrig requested a review from jasnell February 12, 2025 00:28
@anonrig anonrig added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Feb 12, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 12, 2025
@nodejs-github-bot
Copy link
Collaborator

doc/api/process.md Outdated Show resolved Hide resolved
Co-authored-by: Antoine du Hamel <[email protected]>
doc/api/process.md Outdated Show resolved Hide resolved
Co-authored-by: Antoine du Hamel <[email protected]>
Co-authored-by: Antoine du Hamel <[email protected]>
@aduh95 aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label Feb 13, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 13, 2025
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@joyeecheung joyeecheung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

test/es-module/test-esm-tla-unfinished.mjs Show resolved Hide resolved
@nodejs-github-bot
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect exitCode when process fails due to circular dependency of dynamic import
5 participants