< prev index next >

src/java.base/share/classes/java/lang/ProcessBuilder.java

Print this page
rev 51059 : [mq]: process-8189717

@@ -1155,16 +1155,16 @@
      * <p>
      * If starting any of the processes throws an Exception, all processes
      * are forcibly destroyed.
      * <p>
      * The {@code startPipeline} method performs the same checks on
-     * each ProcessBuilder as does the {@link #start} method. The new process
-     * will invoke the command and arguments given by {@link #command()},
-     * in a working directory as given by {@link #directory()},
-     * with a process environment as given by {@link #environment()}.
+     * each ProcessBuilder as does the {@link #start} method. Each new process
+     * invokes the command and arguments given by the respective process builder's
+     * {@link #command()}, in a working directory as given by its {@link #directory()},
+     * with a process environment as given by its {@link #environment()}.
      * <p>
-     * This method checks that the command is a valid operating
+     * Each process builder's command is checked to be a valid operating
      * system command.  Which commands are valid is system-dependent,
      * but at the very least the command must be a non-empty list of
      * non-null strings.
      * <p>
      * A minimal set of system dependent environment variables may

@@ -1172,11 +1172,11 @@
      * As a result, the subprocess may inherit additional environment variable
      * settings beyond those in the process builder's {@link #environment()}.
      * <p>
      * If there is a security manager, its
      * {@link SecurityManager#checkExec checkExec}
-     * method is called with the first component of this object's
+     * method is called with the first component of each process builder's
      * {@code command} array as its argument. This may result in
      * a {@link SecurityException} being thrown.
      * <p>
      * Starting an operating system process is highly system-dependent.
      * Among the many things that can go wrong are:

@@ -1192,12 +1192,12 @@
      * subclass of {@link IOException}.
      * <p>
      * If the operating system does not support the creation of
      * processes, an {@link UnsupportedOperationException} will be thrown.
      * <p>
-     * Subsequent modifications to this process builder will not
-     * affect the returned {@link Process}.
+     * Subsequent modifications to any of the specified builders
+     * will not affect the returned {@link Process}.
      * @apiNote
      * For example to count the unique imports for all the files in a file hierarchy
      * on a Unix compatible platform:
      * <pre>{@code
      * String directory = "/home/duke/src";
< prev index next >