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

Add Deno.exitCode API #23606

Closed
wants to merge 2 commits into from
Closed

Add Deno.exitCode API #23606

wants to merge 2 commits into from

Conversation

lukeed
Copy link
Contributor

@lukeed lukeed commented Apr 29, 2024

Related to #23605

Implements the Deno.exitCode API to allow setting a would-be exit code without immediately terminating the process.

  • Introduces a getter and setter for Deno.exitCode within runtime/js/30_os.js. The setter allows setting a would-be exit code that is stored in a private variable _exitCode. If a number is provided, it is parsed with parseInt and then passed to the op_set_exit_code Rust operation to update the process's exit code without exiting.
  • Ensures that setting Deno.exitCode does not trigger an immediate process exit, allowing for asynchronous cleanup or other operations before the process terminates.

For more details, open the Copilot Workspace session.

@CLAassistant
Copy link

CLAassistant commented Apr 29, 2024

CLA assistant check
All committers have signed the CLA.

@lukeed
Copy link
Contributor Author

lukeed commented Apr 30, 2024

Closed in favor of #23609

@lukeed lukeed closed this Apr 30, 2024
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.

None yet

2 participants