Skip to content

Commit

Permalink
Do not register HUP and QUIT signals when in Windows
Browse files Browse the repository at this point in the history
    Fixes #4160
  • Loading branch information
Luca Di Grazia committed Sep 4, 2022
1 parent 65bb28e commit 0ef9cc5
Showing 1 changed file with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,18 +184,8 @@ public static Application currentApplication() {
public final void run(String[] args) {
try {
if (ImageInfo.inImageRuntimeCode() && System.getenv(DISABLE_SIGNAL_HANDLERS) == null) {
final SignalHandler handler = new SignalHandler() {
@Override
public void handle(Signal signal) {
System.exit(signal.getNumber() + 0x80);
}
};
final SignalHandler quitHandler = new SignalHandler() {
@Override
public void handle(Signal signal) {
DiagnosticPrinter.printDiagnostics(System.out);
}
};
final SignalHandler handler = signal -> System.exit(signal.getNumber() + 0x80);
final SignalHandler quitHandler = signal -> DiagnosticPrinter.printDiagnostics(System.out);
handleSignal("INT", handler);
handleSignal("TERM", handler);
// the HUP and QUIT signals are not defined for the Windows OpenJDK implementation:
Expand Down

0 comments on commit 0ef9cc5

Please sign in to comment.