Browse Source

Make sure the output streams that redirect to loggers are closed (and thus flushed) when the native process completes.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270869 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 23 years ago
parent
commit
3c2b554fbc
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      proposal/myrmidon/src/java/org/apache/aut/nativelib/impl/DefaultExecManager.java

+ 10
- 1
proposal/myrmidon/src/java/org/apache/aut/nativelib/impl/DefaultExecManager.java View File

@@ -22,6 +22,7 @@ import org.apache.aut.nativelib.impl.launchers.MacCommandLauncher;
import org.apache.aut.nativelib.impl.launchers.ScriptCommandLauncher;
import org.apache.aut.nativelib.impl.launchers.WinNTCommandLauncher;
import org.apache.avalon.excalibur.io.FileUtil;
import org.apache.avalon.excalibur.io.IOUtil;

/**
* Default implementation of <code>ExecManager</code>.
@@ -62,7 +63,15 @@ public class DefaultExecManager
{
final LogOutputStream output = new LogOutputStream( handler, false );
final LogOutputStream error = new LogOutputStream( handler, true );
return execute( execMetaData, null, output, error, timeout );
try
{
return execute( execMetaData, null, output, error, timeout );
}
finally
{
IOUtil.shutdownStream( output );
IOUtil.shutdownStream( error );
}
}

/**


Loading…
Cancel
Save