Skip to content

Commit

Permalink
8325203: System.exit(0) kills the launched 3rd party application
Browse files Browse the repository at this point in the history
Backport-of: b9ca2532287b02388cd6f9e69b02a86713fc5b88
  • Loading branch information
TheRealMDoerr committed May 29, 2024
1 parent 0cfee92 commit c9d83d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/jdk.jpackage/windows/native/applauncher/WinLauncher.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -241,7 +241,7 @@ void launchApp() {
}
JOBOBJECT_EXTENDED_LIMIT_INFORMATION jobInfo = { };
jobInfo.BasicLimitInformation.LimitFlags =
JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE;
JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE | JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK;
if (!SetInformationJobObject(jobHandle.get(),
JobObjectExtendedLimitInformation, &jobInfo, sizeof(jobInfo))) {
JP_THROW(SysError(tstrings::any() <<
Expand Down

1 comment on commit c9d83d3

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.