Skip to content

Commit 6944537

Browse files
author
Alexey Semenyuk
committed
8325203: System.exit(0) kills the launched 3rd party application
Reviewed-by: almatvee
1 parent 4368437 commit 6944537

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
@@ -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)