1132 }
1133
1134 /**
1135 * Starts a Process for each ProcessBuilder, creating a pipeline of
1136 * processes linked by their standard output and standard input streams.
1137 * The attributes of each ProcessBuilder are used to start the respective
1138 * process except that as each process is started, its standard output
1139 * is directed to the standard input of the next. The redirects for standard
1140 * input of the first process and standard output of the last process are
1141 * initialized using the redirect settings of the respective ProcessBuilder.
1142 * All other {@code ProcessBuilder} redirects should be
1143 * {@link Redirect#PIPE Redirect.PIPE}.
1144 * <p>
1145 * All input and output streams between the intermediate processes are
1146 * not accessible.
1147 * The {@link Process#getOutputStream standard input} of all processes
1148 * except the first process are <i>null output streams</i>
1149 * The {@link Process#getInputStream standard output} of all processes
1150 * except the last process are <i>null input streams</i>.
1151 * <p>
1152 * The {@link #redirectErrorStream} of each ProcessBuilder applies to the
1153 * respective process. If set to {@code true}, the error stream is written
1154 * to the same stream as standard output.
1155 * <p>
1156 * If starting any of the processes throws an Exception, all processes
1157 * are forcibly destroyed.
1158 * <p>
1159 * The {@code startPipeline} method performs the same checks on
1160 * each ProcessBuilder as does the {@link #start} method. The new process
1161 * will invoke the command and arguments given by {@link #command()},
1162 * in a working directory as given by {@link #directory()},
1163 * with a process environment as given by {@link #environment()}.
1164 * <p>
1165 * This method checks that the command is a valid operating
1166 * system command. Which commands are valid is system-dependent,
1167 * but at the very least the command must be a non-empty list of
1168 * non-null strings.
1169 * <p>
1170 * A minimal set of system dependent environment variables may
1171 * be required to start a process on some operating systems.
1172 * As a result, the subprocess may inherit additional environment variable
|
1132 }
1133
1134 /**
1135 * Starts a Process for each ProcessBuilder, creating a pipeline of
1136 * processes linked by their standard output and standard input streams.
1137 * The attributes of each ProcessBuilder are used to start the respective
1138 * process except that as each process is started, its standard output
1139 * is directed to the standard input of the next. The redirects for standard
1140 * input of the first process and standard output of the last process are
1141 * initialized using the redirect settings of the respective ProcessBuilder.
1142 * All other {@code ProcessBuilder} redirects should be
1143 * {@link Redirect#PIPE Redirect.PIPE}.
1144 * <p>
1145 * All input and output streams between the intermediate processes are
1146 * not accessible.
1147 * The {@link Process#getOutputStream standard input} of all processes
1148 * except the first process are <i>null output streams</i>
1149 * The {@link Process#getInputStream standard output} of all processes
1150 * except the last process are <i>null input streams</i>.
1151 * <p>
1152 * The {@link #redirectErrorStream()} of each ProcessBuilder applies to the
1153 * respective process. If set to {@code true}, the error stream is written
1154 * to the same stream as standard output.
1155 * <p>
1156 * If starting any of the processes throws an Exception, all processes
1157 * are forcibly destroyed.
1158 * <p>
1159 * The {@code startPipeline} method performs the same checks on
1160 * each ProcessBuilder as does the {@link #start} method. The new process
1161 * will invoke the command and arguments given by {@link #command()},
1162 * in a working directory as given by {@link #directory()},
1163 * with a process environment as given by {@link #environment()}.
1164 * <p>
1165 * This method checks that the command is a valid operating
1166 * system command. Which commands are valid is system-dependent,
1167 * but at the very least the command must be a non-empty list of
1168 * non-null strings.
1169 * <p>
1170 * A minimal set of system dependent environment variables may
1171 * be required to start a process on some operating systems.
1172 * As a result, the subprocess may inherit additional environment variable
|