ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Gordon" <tim.gor...@allustra.com>
Subject RE: Console output for exec
Date Thu, 19 Aug 2004 10:27:22 GMT
Can I have a straw poll of users who'd find console output for spawned
process useful while the parent ANT process still lives?

I think I might have a change that's about 10 lines to alleviate the problem
of reparenting Process I/O - it's working great for me on Windows and Linux.
If people want it I'll start a discussion over on the developers list...

The other thing is that while Execute is explicity closing the Process
output stream, I don't see why this makes the situation any safer while
leaving the Process input and error streams open and hence attached to the
ANT JVM - what happens if spawned Process is trying to draw input when the
ANT JVM terminates?

This seems to be best sorted by shutdown hooks closing streams instead. If
the JVM is terminating and the shutdown hooks don't get run for some reason
then the situation is already so bad that worrying about whether streams are
going to be detached gracefully is the least of our worries.

-----Original Message-----
From: Matt Benson [mailto:gudnabrsam@yahoo.com]
Sent: 18 August 2004 17:46
To: Ant Users List
Subject: Re: Console output for exec


AFAIK this functionality was originally included in
the submission to handle Process I/O in the basic way
it is handled today.  The best I can reconstruct it
after the fact, there was concern about
inconsistencies of what happens when the I/O of a
spawned process is tied to the JVM but the process
then outlives the JVM.  So in short, the code to do
what you ask has been explicitly removed from Ant at
some point in the past.

HTH,
Matt


--- Tim Gordon <tim.gordon@allustra.com> wrote:

> Boys and Girls
>
> For those of you who think about these things, is
> there any god reason why
> the System.out and System.err of processes that are
> spawned by <exec> when
> spawn="true" aren't reparented to the main ANT
> process's?
>
> I wrote a <spawn> task pre-1.6, which was basically
> a hack of <exec> with
> the waiting for the termination of the stream from
> the child process
> removed.
>
> I'm happy to try and re-fit this to 1.6.2 and submit
> a patch, but before I
> do it can anyone think of why this would be a
> fundamentally wrong thing to
> do?
>
> Tim
>
> Allustra Limited
> 85 Gracechurch Street
> London
> EC3V 0AA
> Tel +44 (0)20 7469 8640
> Fax +44 (0)20 7469 8689
> http://www.allustra.com/
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
>
>




__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message