From d796dcb4d732ec9b96b8a8539dadeca3ee1d365f Mon Sep 17 00:00:00 2001 From: Martin Doerr Date: Wed, 29 May 2024 06:57:35 +0000 Subject: [PATCH] 8325203: System.exit(0) kills the launched 3rd party application Backport-of: b9ca2532287b02388cd6f9e69b02a86713fc5b88 --- src/jdk.jpackage/windows/native/applauncher/WinLauncher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jdk.jpackage/windows/native/applauncher/WinLauncher.cpp b/src/jdk.jpackage/windows/native/applauncher/WinLauncher.cpp index 7522beaf2de..2a8aaf8ad8d 100644 --- a/src/jdk.jpackage/windows/native/applauncher/WinLauncher.cpp +++ b/src/jdk.jpackage/windows/native/applauncher/WinLauncher.cpp @@ -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 @@ -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() <<