diff --git a/src/java.base/share/classes/java/lang/ProcessBuilder.java b/src/java.base/share/classes/java/lang/ProcessBuilder.java index c2b3570d1cc..a7076ca4584 100644 --- a/src/java.base/share/classes/java/lang/ProcessBuilder.java +++ b/src/java.base/share/classes/java/lang/ProcessBuilder.java @@ -1004,6 +1004,8 @@ public final class ProcessBuilder * be required to start a process on some operating systems. * As a result, the subprocess may inherit additional environment variable * settings beyond those in the process builder's {@link #environment()}. + * The minimal set of system dependent environment variables + * may override the values provided in the environment. * *

If there is a security manager, its * {@link SecurityManager#checkExec checkExec} @@ -1181,6 +1183,8 @@ public final class ProcessBuilder * be required to start a process on some operating systems. * As a result, the subprocess may inherit additional environment variable * settings beyond those in the process builder's {@link #environment()}. + * The minimal set of system dependent environment variables + * may override the values provided in the environment. *

* If there is a security manager, its * {@link SecurityManager#checkExec checkExec} diff --git a/src/java.base/share/classes/java/lang/Runtime.java b/src/java.base/share/classes/java/lang/Runtime.java index ffef8160c25..25d2351a24e 100644 --- a/src/java.base/share/classes/java/lang/Runtime.java +++ b/src/java.base/share/classes/java/lang/Runtime.java @@ -569,6 +569,8 @@ public class Runtime { * be required to start a process on some operating systems. * As a result, the subprocess may inherit additional environment variable * settings beyond those in the specified environment. + * The minimal set of system dependent environment variables + * may override the values provided in the environment. * *

{@link ProcessBuilder#start()} is now the preferred way to * start a process with a modified environment. diff --git a/src/java.base/share/classes/java/lang/foreign/Linker.java b/src/java.base/share/classes/java/lang/foreign/Linker.java index e3af69954a8..12ba7f6ce5f 100644 --- a/src/java.base/share/classes/java/lang/foreign/Linker.java +++ b/src/java.base/share/classes/java/lang/foreign/Linker.java @@ -303,8 +303,8 @@ public sealed interface Linker permits AbstractLinker { * before it can be overwritten by the Java runtime, or read through conventional means} *

* A downcall method handle linked with this option will feature an additional {@link MemorySegment} - * parameter directly following the target address parameter. This memory segment must be a - * native segment into which the captured state is written. + * parameter directly following the target address, and optional {@link SegmentAllocator} parameters. + * This memory segment must be a native segment into which the captured state is written. * * @param capturedState the names of the values to save. * @see CaptureCallState#supported() @@ -323,6 +323,10 @@ public sealed interface Linker permits AbstractLinker { *

* Execution state is captured by a downcall method handle on invocation, by writing it * to a native segment provided by the user to the downcall method handle. + * For this purpose, a downcall method handle linked with the {@link #captureCallState(String[])} + * option will feature an additional {@link MemorySegment} parameter directly + * following the target address, and optional {@link SegmentAllocator} parameters. + * This parameter represents the native segment into which the captured state is written. *

* The native segment should have the layout {@linkplain CaptureCallState#layout associated} * with the particular {@code CaptureCallState} instance used to link the downcall handle.