diff --git a/jdk/src/java.base/share/classes/java/lang/Process.java b/jdk/src/java.base/share/classes/java/lang/Process.java index 88ee5f0f53f..e5077f9dcc0 100644 --- a/jdk/src/java.base/share/classes/java/lang/Process.java +++ b/jdk/src/java.base/share/classes/java/lang/Process.java @@ -500,7 +500,8 @@ public abstract class Process { /** * Returns a snapshot of the direct children of the process. - * A process that is {@link #isAlive not alive} has zero children. + * The parent of a direct child process is the process. + * Typically, a process that is {@link #isAlive not alive} has no children. *
* Note that processes are created and terminate asynchronously.
* There is no guarantee that a process is {@link #isAlive alive}.
@@ -510,8 +511,8 @@ public abstract class Process {
* This implementation returns the direct children as:
* {@link #toHandle toHandle().children()}.
*
- * @return a Stream of ProcessHandles for processes that are direct children
- * of the process
+ * @return a sequential Stream of ProcessHandles for processes that are
+ * direct children of the process
* @throws UnsupportedOperationException if the Process implementation
* does not support this operation
* @throws SecurityException if a security manager has been installed and
@@ -524,7 +525,9 @@ public abstract class Process {
/**
* Returns a snapshot of the direct and indirect children of the process.
- * A process that is {@link #isAlive not alive} has zero children.
+ * An indirect child is one whose parent is either a direct child or
+ * another indirect child.
+ * Typically, a process that is {@link #isAlive not alive} has no children.
*
* Note that processes are created and terminate asynchronously.
* There is no guarantee that a process is {@link #isAlive alive}.
@@ -534,8 +537,8 @@ public abstract class Process {
* This implementation returns all children as:
* {@link #toHandle toHandle().allChildren()}.
*
- * @return a Stream of ProcessHandles for processes that are direct and
- * indirect children of the process
+ * @return a sequential Stream of ProcessHandles for processes that are
+ * direct and indirect children of the process
* @throws UnsupportedOperationException if the Process implementation
* does not support this operation
* @throws SecurityException if a security manager has been installed and
diff --git a/jdk/src/java.base/share/classes/java/lang/ProcessHandle.java b/jdk/src/java.base/share/classes/java/lang/ProcessHandle.java
index 980870c5bb7..95d77fe68ca 100644
--- a/jdk/src/java.base/share/classes/java/lang/ProcessHandle.java
+++ b/jdk/src/java.base/share/classes/java/lang/ProcessHandle.java
@@ -149,14 +149,15 @@ public interface ProcessHandle extends Comparable
* Note that processes are created and terminate asynchronously.
* There is no guarantee that a process is {@link #isAlive alive}.
*
*
- * @return a Stream of ProcessHandles for processes that are direct children
- * of the process
+ * @return a sequential Stream of ProcessHandles for processes that are
+ * direct children of the process
* @throws SecurityException if a security manager has been installed and
* it denies RuntimePermission("manageProcess")
*/
@@ -164,14 +165,16 @@ public interface ProcessHandle extends Comparable
* Note that processes are created and terminate asynchronously.
* There is no guarantee that a process is {@link #isAlive alive}.
*
*
- * @return a Stream of ProcessHandles for processes that are direct and
- * indirect children of the process
+ * @return a sequential Stream of ProcessHandles for processes that are
+ * direct and indirect children of the process
* @throws SecurityException if a security manager has been installed and
* it denies RuntimePermission("manageProcess")
*/