Skip to content

Commit c9d83d3

Browse files
committed
8325203: System.exit(0) kills the launched 3rd party application
Backport-of: b9ca2532287b02388cd6f9e69b02a86713fc5b88
1 parent 0cfee92 commit c9d83d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/jdk.jpackage/windows/native/applauncher/WinLauncher.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -241,7 +241,7 @@ void launchApp() {
241241
}
242242
JOBOBJECT_EXTENDED_LIMIT_INFORMATION jobInfo = { };
243243
jobInfo.BasicLimitInformation.LimitFlags =
244-
JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE;
244+
JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE | JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK;
245245
if (!SetInformationJobObject(jobHandle.get(),
246246
JobObjectExtendedLimitInformation, &jobInfo, sizeof(jobInfo))) {
247247
JP_THROW(SysError(tstrings::any() <<

0 commit comments

Comments
 (0)