Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,29 @@ static void beforeHalt() {
private static void logRuntimeExit(int status) {
// Disable exit logging (GR-45418/JDK-8301627)
}

@Alias
static native void runHooks();

@Alias
static native void halt(int status);

/**
* This substitution makes a few modifications to {@code Shutdown#exit}:
* <ul>
* <li>it omits {@code logRuntimeExit} (exit logging is disabled: GR-45418/JDK-8301627).</li>
* <li>it omits {@code beforeHalt} (not implemented).</li>
* <li>it runs teardown hooks after running shutdown hooks and before halting.</li>
* </ul>
*/
@Substitute
static void exit(int status) {
synchronized (Target_java_lang_Shutdown.class) {
runHooks();
RuntimeSupport.executeTearDownHooks();
halt(status);
}
}
}

/** Utility methods for Target_java_lang_Shutdown. */
Expand Down
Loading