ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: [myrmidon] Logging fails after <exec> task; patch with possible solution.
Date Sat, 02 Mar 2002 02:39:44 GMT
Hi,

I finally got around to applying the patch - thanks!

On Thu, 21 Feb 2002 17:53, Darrell DeBoer wrote:
> Hi
>
> I've just started playing around with the myrmidon Ant2 proposal, as I'm
> hoping to get involved. While running a few of the sample targets, I
> noticed that after any <exec> task, no further messages are logged. This is
> due to the fact that o.a.aut.nativelib.impl.ProcessMonitor is shutting down
> all streams after the Process has been executed.  Because
> o.a.myrmidon.framework.Execute.executeNativeProcess() is passing in
> System.out, this is being closed, preventing any further messages to the
> console.
>
> The supplied patch fixes this by making the code that creates the Stream
> responsible for closing them. I added a flag to ProcessMonitor to
> optionally force it close the Streams when the Process terminates, but I
> would imagine that this would be only used for monitoring an asynchronous
> Process.
>
> However, an alternative would be to make the ExecManager.execute() contract
> clearly specify that all Streams will be closed, and make sure that
> o.a.myrmidon.framework.Execute.executeNativeProcess() doesn't pass in
> System.out, but instead passes in an OutputStream that can be safely
> closed.
>
> If the latter is a preferable solution, I'd be happy to do up a patch for
> that.
>
> ciao
> Daz

-- 
Cheers,

Pete

*--------------------------------*
| Every rule has an exception,   |
| except the rule of exceptions. |
*--------------------------------*

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message