On 4/19/2011 8:29 AM, Nicolas Lalevée wrote:
Thank you very much for the pointers. The patch for the bug report #50507 seems
to tackle the streaming issue.
I guess that in Ant we always want to see the log by line, rather than with
usual unix tools where the output is streamed. With unix tools, streaming is
useful when pipelining commands. I guess we never do that with Ant.
In the suggested patch, line ending "awareness" is only enabled when we merge
both the standard output stream and the error one.
I think the line ending awareness is enabled by the patch in the case
when there is no redirection of either standard err or standard out to
files or properties. I do not think it is the same as merging standard
out and standard err, except that if a line of standard err is produced
by the executable between two lines of standard out it will be visible
that way.
If one of the two stream, out and err, is not redirected to a file or
copied to a property, lines should still be preserved, so other use
cases should be changed functionally if currently they break lines.
So if somebody really want to do output stream pipelining, he most probably
doesn't want mixing these streams. For such used case, the best approach would
then be to extends the ExecTask and override createHandler() to implement its
proper pipelining.
I am not sure I understand.
Sounds reasonable ?
Nicolas
Regards,
Antoine
Le 18 avr. 2011 à 23:13, Antoine Levy-Lambert a écrit :
In fact we have a number of open bugs concerning the handling of streams in
exec and java :
[1] Pipe Broken
[2] Exec task may mix the stderr and stdout output while logging it
[3] exec task sometimes inserts extraneous newlines
[4] read on System.in hangs for forked java task
Antoine
[1] https://issues.apache.org/bugzilla/show_bug.cgi?id=48789
[2] https://issues.apache.org/bugzilla/show_bug.cgi?id=50507
[3] https://issues.apache.org/bugzilla/show_bug.cgi?id=48746
[4] https://issues.apache.org/bugzilla/show_bug.cgi?id=50960
On 4/18/2011 4:03 PM, Antoine Levy-Lambert wrote:
there is an interesting patch in this bug report :
https://issues.apache.org/bugzilla/show_bug.cgi?id=50507
Regards,
Antoine
On 4/18/2011 4:14 AM, Nicolas Lalevée wrote:
Le 18 avr. 2011 à 08:10, Conor MacNeill a écrit :
Nicolas,
The change you introduced to address this bug
https://issues.apache.org/bugzilla/show_bug.cgi?id=50960
really breaks my output when running java processes because the
autoflush is flushing at 128 byte boundaries. The log output stream
always writes a line when flush is called.
Here is an example:
[java] 15:53:53 WARN - Package Scanner found duplicates for
package 'org.w3c.dom' with different ver
[java] sions. Files: xom-1.1.jar and xmlbeans-2.3.0.jar
[java] '/Users/conor/work/fedefault/output/dist/lib/xom-1.1.jar'
[java] '/Users/conor/wor
[java] k/fedefault/output/dist/lib/xmlbeans-2.3.0.jar'
hum...
I guess that more than a simple "autoflush" we should have something like an
"autoflush-on-end-of-line".
I'll try something.
Nicolas
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org