RE: Use stdin as input for a forked java task

2003-10-01 Thread Conor MacNeill
> From: Bart Golsteijn [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 2 October 2003 12:16 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Use stdin as input for a forked java task
>
>
> Why isn't this going to be implemented? Is there a large
> technical problem
> to implement this? If you can point out the problem, maybe I can
> work it out
> myself.
>
> Bart

There are a few issues. The main issue is pumping the input into the
external process. There is no way to know when or if an external process
wants input. We can't know how much data to send to the external process.
Since there are buffers involved, it would probably not block until we'd
filled up some buffer. In that case, we'd have to consume some block of
input from Ant's input stream to send to the external process. This would be
before the extenral process had generated prompts, etc. With a string or
file, we can safely pump as much input into the process as it will accept.

The other issue comes when running multiple operations in parallel. Which
one gets the input?

The only possibility I could see would be to create some sort of external
console to supply input to the forked process.

Conor


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Use stdin as input for a forked java task

2003-10-01 Thread Bart Golsteijn
Why isn't this going to be implemented? Is there a large technical problem 
to implement this? If you can point out the problem, maybe I can work it out 
myself.

Bart

From: Stefan Bodewig <[EMAIL PROTECTED]>
Reply-To: "Ant Developers List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: Use stdin as input for a forked java task
Date: 01 Oct 2003 15:42:38 +0200
On Tue, 30 Sep 2003, Bart Golsteijn <[EMAIL PROTECTED]> wrote:
> I saw it possible to specify an input file for a (forked) java task
> in Ant 1.60. Is there (going to be) a possibility to read input from
> stdin?
No, at least not in 1.6.
Stefan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
MSN Zoeken, voor duidelijke zoekresultaten! http://search.msn.nl
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Use stdin as input for a forked java task

2003-10-01 Thread Stefan Bodewig
On Tue, 30 Sep 2003, Bart Golsteijn <[EMAIL PROTECTED]> wrote:

> I saw it possible to specify an input file for a (forked) java task
> in Ant 1.60. Is there (going to be) a possibility to read input from
> stdin?

No, at least not in 1.6.

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Use stdin as input for a forked java task

2003-09-30 Thread Bart Golsteijn
I saw it possible to specify an input file for a (forked) java task in Ant 
1.60. Is there (going to be) a possibility to read input from stdin? (for 
example 'input=-' reads from stdin)

Thanks in advance,
Bart
_
MSN Zoeken, voor duidelijke zoekresultaten! http://search.msn.nl
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]