Skip to content

Commit b9ca253

Browse files
committed
8325203: System.exit(0) kills the launched 3rd party application
Backport-of: 6944537c3ebbbb638479e4c2b90a71ad5869023c
1 parent 1c4479f commit b9ca253

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

+2-2
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
@@ -264,7 +264,7 @@ void launchApp() {
264264
}
265265
JOBOBJECT_EXTENDED_LIMIT_INFORMATION jobInfo = { };
266266
jobInfo.BasicLimitInformation.LimitFlags =
267-
JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE;
267+
JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE | JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK;
268268
if (!SetInformationJobObject(jobHandle.get(),
269269
JobObjectExtendedLimitInformation, &jobInfo, sizeof(jobInfo))) {
270270
JP_THROW(SysError(tstrings::any() <<

0 commit comments

Comments
 (0)