On Sat, 21 Mar 2026 06:09:27 GMT, Thomas Stuefe <[email protected]> wrote:

>> (for JDK 26)
>> 
>> Note: This PR is a continuation of the old PR here: 
>> https://github.com/openjdk/jdk/pull/25260; had to close the old one since I 
>> had Skara problems after the JDK25 split-off.
>> 
>> 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 clarifies 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.
>
> Thomas Stuefe has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   reduce comment

This looks good to me too.  I appreciate it now being reduced down to just the 
removal of `vfork` and I verified that the code paths for the other 
implementations remain the same.  All copyright headers are updated where 
needed and it's good to see the back of some of the dated code & comments, 
especially `execve_as_traditional_shell_script`.

>From reading this PR, the CSR and some of the history, it seems that the 
>writing was on the wall for `vfork` as soon as `posix_spawn` was added; at 
>least on Linux, this has the advantages of `vfork` but performed more safely.  
>With `posix_spawn` being the default for multiple LTS releases and `VFORK` 
>only being available on Linux as far back as I can see, I don't anticipate 
>removing this causing many issues.  `FORK` seems like a sensible replacement 
>when an explicit option other than `POSIX_SPAWN` has been specified.

-------------

Marked as reviewed by andrew (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/25768#pullrequestreview-4027296550

Reply via email to