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

process.exit() in ESM results in exit code 13 #40808

Closed
NMinhNguyen opened this issue Nov 13, 2021 · 0 comments · Fixed by #41388
Closed

process.exit() in ESM results in exit code 13 #40808

NMinhNguyen opened this issue Nov 13, 2021 · 0 comments · Fixed by #41388
Labels
esm Issues and PRs related to the ECMAScript Modules implementation. process Issues and PRs related to the process subsystem.

Comments

@NMinhNguyen
Copy link

Version

v16.13.0

Platform

No response

Subsystem

No response

What steps will reproduce the bug?

echo "process.exit()" > test.mjs
node ./test.mjs # this exits with code 13
echo "process.exit()" > test.cjs
node ./test.cjs # this exits with code 0

How often does it reproduce? Is there a required condition?

Seems to only happen when using ES modules.

What is the expected behavior?

The process should exit with code 0.

What do you see instead?

The process exits with code 13.

Additional information

This seems to have been introduced in #34640 to handle unfinished TLA, but in this instance I'm not even using TLA so it seems like a false positive.

@Mesteery Mesteery added esm Issues and PRs related to the ECMAScript Modules implementation. process Issues and PRs related to the process subsystem. confirmed-bug Issues with confirmed bugs. and removed confirmed-bug Issues with confirmed bugs. labels Nov 13, 2021
aduh95 pushed a commit that referenced this issue Jan 14, 2022
Due to a bug in top-level await implementation, it used to default to
exit code 13.

PR-URL: #41388
Fixes: #40808
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
aduh95 pushed a commit to aduh95/node that referenced this issue Jan 14, 2022
Due to a bug in top-level await implementation, it used to default to
exit code 13.

PR-URL: nodejs#41388
Fixes: nodejs#40808
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
targos pushed a commit that referenced this issue Jan 14, 2022
Due to a bug in top-level await implementation, it used to default to
exit code 13.

PR-URL: #41388
Fixes: #40808
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
mawaregetsuka pushed a commit to mawaregetsuka/node that referenced this issue Jan 17, 2022
Due to a bug in top-level await implementation, it used to default to
exit code 13.

PR-URL: nodejs#41388
Fixes: nodejs#40808
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
thedull pushed a commit to thedull/node that referenced this issue Jan 18, 2022
Due to a bug in top-level await implementation, it used to default to
exit code 13.

PR-URL: nodejs#41388
Fixes: nodejs#40808
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
richardlau pushed a commit that referenced this issue Jan 25, 2022
Due to a bug in top-level await implementation, it used to default to
exit code 13.

PR-URL: #41388
Backport-PR-URL: #41508
Fixes: #40808
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
Linkgoron pushed a commit to Linkgoron/node that referenced this issue Jan 31, 2022
Due to a bug in top-level await implementation, it used to default to
exit code 13.

PR-URL: nodejs#41388
Fixes: nodejs#40808
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
danielleadams pushed a commit that referenced this issue Feb 1, 2022
Due to a bug in top-level await implementation, it used to default to
exit code 13.

PR-URL: #41388
Fixes: #40808
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
esm Issues and PRs related to the ECMAScript Modules implementation. process Issues and PRs related to the process subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants