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

[Entitlements] Implementing the correct exit functions (Runtime) #118657

Merged

Conversation

ldematte
Copy link
Contributor

We choose System.exit as the first use case for Entitlements; however, the correct functions to check for permission to exit the JVM process are Runtime.exit and Runtime.halt; these are the "lower" side of the public JVM interface (they are publicly exposed and call into the JVM, while System.exit just defers to Runtime.exit).

This PR fixes that, implementing check functions for Runtime.exit and Runtime.halt to replace System.exit

Closes ES-10348

@ldematte ldematte added >non-issue :Core/Infra/Core Core issues without another label auto-backport Automatically create backport pull requests when merged v9.0.0 v8.18.0 labels Dec 13, 2024
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Dec 13, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

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

LGTM.

@ldematte ldematte merged commit 1bad1cf into elastic:main Dec 13, 2024
16 checks passed
@ldematte ldematte deleted the entitlements/system-exit-to-runtime-exit branch December 13, 2024 15:21
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.x

ldematte added a commit to ldematte/elasticsearch that referenced this pull request Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged :Core/Infra/Core Core issues without another label >non-issue Team:Core/Infra Meta label for core/infra team v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants