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
Reviewed-by: almatvee
  • Loading branch information
Alexey Semenyuk committed Feb 9, 2024
1 parent 4368437 commit 6944537
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

3 comments on commit 6944537

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexeysemenyukoracle
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk22u

@openjdk
Copy link

@openjdk openjdk bot commented on 6944537 Feb 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexeysemenyukoracle the backport was successfully created on the branch backport-alexeysemenyukoracle-6944537c in my personal fork of openjdk/jdk22u. To create a pull request with this backport targeting openjdk/jdk22u:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 6944537c from the openjdk/jdk repository.

The commit being backported was authored by Alexey Semenyuk on 9 Feb 2024 and was reviewed by Alexander Matveev.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk22u:

$ git fetch https://github.com/openjdk-bots/jdk22u.git backport-alexeysemenyukoracle-6944537c:backport-alexeysemenyukoracle-6944537c
$ git checkout backport-alexeysemenyukoracle-6944537c
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk22u.git backport-alexeysemenyukoracle-6944537c

⚠️ @alexeysemenyukoracle You are not yet a collaborator in my fork openjdk-bots/jdk22u. An invite will be sent out and you need to accept it before you can proceed.

Please sign in to comment.