@ -949,9 +949,7 @@ public abstract class FS {
* @param outRedirect
* @param outRedirect
* An OutputStream on which to redirect the processes stdout . Can
* An OutputStream on which to redirect the processes stdout . Can
* be < code > null < / code > , in which case the processes standard
* be < code > null < / code > , in which case the processes standard
* output will be lost . If binary is set to < code > false < / code >
* output will be lost .
* then it is expected that the process emits text data which
* should be processed line by line .
* @param errRedirect
* @param errRedirect
* An OutputStream on which to redirect the processes stderr . Can
* An OutputStream on which to redirect the processes stderr . Can
* be < code > null < / code > , in which case the processes standard
* be < code > null < / code > , in which case the processes standard
@ -959,9 +957,9 @@ public abstract class FS {
* @param inRedirect
* @param inRedirect
* An InputStream from which to redirect the processes stdin . Can
* An InputStream from which to redirect the processes stdin . Can
* be < code > null < / code > , in which case the process doesn ' t get
* be < code > null < / code > , in which case the process doesn ' t get
* any data over stdin . If binary is set to
* any data over stdin . It is assumed that the whole InputStream
* < code > false < / code > then it is expected that the process
* will be consumed by the process . The method will close the
* expects text data which should be processed line by line .
* inputstream after all bytes are read .
* @return the return code of this process .
* @return the return code of this process .
* @throws IOException
* @throws IOException
* if an I / O error occurs while executing this process .
* if an I / O error occurs while executing this process .
@ -1011,6 +1009,9 @@ public abstract class FS {
// A process doesn't clean its own resources even when destroyed
// A process doesn't clean its own resources even when destroyed
// Explicitly try and close all three streams, preserving the
// Explicitly try and close all three streams, preserving the
// outer I/O exception if any.
// outer I/O exception if any.
if ( inRedirect ! = null ) {
inRedirect . close ( ) ;
}
try {
try {
process . getErrorStream ( ) . close ( ) ;
process . getErrorStream ( ) . close ( ) ;
} catch ( IOException e ) {
} catch ( IOException e ) {