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: 6944537
  • Loading branch information
GoeLin committed Apr 8, 2024
1 parent 1c4479f commit b9ca253
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 @@ -264,7 +264,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

0 comments on commit b9ca253

Please sign in to comment.