commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Siegfried Goeschl <siegfried.goes...@it20one.at>
Subject Re: [exec] Redirecting input
Date Tue, 30 Nov 2010 15:55:31 GMT
Hi Norman,

there is a regression test which feeds a ByteArrayInputStream to 
System.in of the child process (DefaultExecutorTest#testStdInHandling).

I had a quick look at the exec-maven-plugin which uses commons-exec

http://mojo.codehaus.org/exec-maven-plugin/xref/

and they are simply calling

exec.setStreamHandler( new PumpStreamHandler( out, err, System.in ) );

but I never tried that personally. Having said that I would be happy if 
you could some feedback how it worked ... :-)

Cheers,

Siegfried Goeschl

On 11/29/10 5:35 PM, norm@dad.org wrote:
> How can I redirect my input (System.in ) to the input of the invoked process
> (Processes.getOutputStream())?
>
> Thank you, Norman Shapiro.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

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


Mime
View raw message