-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[GR-64787] Enable --install-exit-handlers by default. #11149
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
base: master
Are you sure you want to change the base?
Conversation
eeab102
to
44fb8aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @vjovanov , Quarkus is already setting up its own signal handlers so we would like to have the option to disable this (at least for some transition period). Is it safe to assume -H:-InstallExitHandlers
will survive at least till GraalVM for JDK 29? Thanks.
|
||
@APIOption(name = "install-exit-handlers", deprecated = "Enabled by default for executables. For shared libraries (when --shared is used), use the experimental option -H:+InstallJavaExitHandlersForSharedLibrary.")// | ||
@Option(help = "Provide java.lang.Terminator exit handlers", deprecated = true, deprecationMessage = "Enabled by default for executables. For shared libraries (when --shared is used), use the experimental option -H:+InstallJavaExitHandlersForSharedLibrary.")// | ||
protected static final HostedOptionKey<Boolean> InstallExitHandlers = new HostedOptionKey<>(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be true?
protected static final HostedOptionKey<Boolean> InstallExitHandlers = new HostedOptionKey<>(false); | |
protected static final HostedOptionKey<Boolean> InstallExitHandlers = new HostedOptionKey<>(true); |
eaba4d0
to
61e8e67
Compare
Enable `--install-exit-handlers` by default and deprecate the option. Image size increase is negligable (10 types with 53 mehtods), and there is only 2.5% extra starup instructions (68498) for "Hello, World!" on Linux. If shared libraries were using this flag, the same functionality can be restored by using `-H:+InstallJavaExitHandlersForSharedLibrary`.
61e8e67
to
65ad0eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGMT. Thanks @vjovanov
I did some testing and it looks like Quarkus can still override the signal handlers installed by GraalVM so this is not an issue after all, although it might still make sense to keep around for other users. Sorry for the noise. |
Enable
--install-exit-handlers
by default and deprecate the option.Image size increase is negligible (10 new types and 53 new methods), and there is only 2.5% extra startup instructions (68498) for "Hello, World!" on Linux.