You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by no...@dad.org on 2010/12/01 17:27:02 UTC

Re: [exec] Redirecting input

Siegfried Goeschl <si...@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