Skip to content

8357089: Remove VFORK launch mechanism from Process implementation (linux) #25260

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tstuefe
Copy link
Member

@tstuefe tstuefe commented May 16, 2025

Not for JDK 25

See the companion CSR (https://bugs.openjdk.org/browse/JDK-8357090) for the ratio behind this removal.

Patch

  • removes all code handling the VFORK mode.
  • removes or rewrites comments explaining use of vfork by the JVM.
  • we now print out an error message to stderr if the user still specifies -Djdk.lang.Process.launchMechanism=vfork.

Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change requires a CSR request matching fixVersion 25 to be approved (needs to be created)

Issue

  • JDK-8357089: Remove VFORK launch mechanism from Process implementation (linux) (Enhancement - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25260/head:pull/25260
$ git checkout pull/25260

Update a local copy of the PR:
$ git checkout pull/25260
$ git pull https://git.openjdk.org/jdk.git pull/25260/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 25260

View PR using the GUI difftool:
$ git pr show -t 25260

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25260.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 16, 2025

👋 Welcome back stuefe! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented May 16, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot changed the title JDK-8357089: Remove VFORK launch mechanism from Process implementation (linux) 8357089: Remove VFORK launch mechanism from Process implementation (linux) May 16, 2025
@openjdk openjdk bot added the csr Pull request needs approved CSR before integration label May 16, 2025
@openjdk
Copy link

openjdk bot commented May 16, 2025

@tstuefe The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label May 16, 2025
@tstuefe tstuefe marked this pull request as ready for review May 16, 2025 07:23
@openjdk openjdk bot added the rfr Pull request is ready for review label May 16, 2025
@mlbridge
Copy link

mlbridge bot commented May 16, 2025

Webrevs

@tstuefe
Copy link
Member Author

tstuefe commented May 16, 2025

I will delay this push for early JDK 26; hence back to draft state.

@tstuefe tstuefe marked this pull request as draft May 16, 2025 08:40
@openjdk openjdk bot removed the rfr Pull request is ready for review label May 16, 2025
Copy link
Contributor

@RogerRiggs RogerRiggs left a comment

Choose a reason for hiding this comment

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

Delaying the removal to jdk 26 is good.
But there should be a warning/deprecation in JDK 25.

Comment on lines +99 to +107
// On Posix platforms, chose a launch mechanism (should be value of a LaunchMechanism enum)
if (OperatingSystem.current() != OperatingSystem.WINDOWS) {
String v = s.toUpperCase(Locale.ROOT);
if (v.equals("VFORK")) {
System.err.println("The VFORK launch mechanism has been removed; please either remove the " +
"jdk.lang.Process.launchMechanism property (preferred) or use " +
"-Djdk.lang.Process.launchMechanism=FORK instead.");
}
return LaunchMechanism.valueOf(v);
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to check for Windows, Windows has a completely separate implementation. Its in the switch to make switch exhaustive.
The first change should just be deprecation, not removal, so output the message but continue.
The message should have some prefix that stands out ALL-CAPS or something big and ugly.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
core-libs core-libs-dev@openjdk.org csr Pull request needs approved CSR before integration
Development

Successfully merging this pull request may close these issues.

2 participants