commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@dad.org
Subject Re: [exec] Redirecting input
Date Wed, 01 Dec 2010 16:27:02 GMT
Siegfried Goeschl <siegfried.goeschl@it20one.at> writes:
>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 ... :-)

Seems to work. Though I haven't checked it very throughly. Thank you
very much.

BUT, why isn't that the default?


>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

    Norman Shapiro
    798 Barron Avenue
    Palo Alto CA 94306-3109
    (650) 565-8215
    norm@dad.org

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


Mime
View raw message