You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "dgü (Jira)" <ji...@apache.org> on 2022/07/05 15:16:00 UTC

[jira] [Updated] (SSHD-1276) How to merge output and error streams of remote process ?

     [ https://issues.apache.org/jira/browse/SSHD-1276?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

dgü updated SSHD-1276:
----------------------
    Description: 
Hello!

I want to merge output and error streams of remote process as {{java.lang.ProcessBuilder#redirectErrorStream(true)}} does.

If I set output and error streams;
{quote}channelExec.setOut(mergedOutputStream);
channelExec.setErr(mergedOutputStream);
channelExec.open.verify();
{quote}
Then, {{ChannelExec#getInvertedOut()}} and {{ChannelExec#getInvertedErr()}} return {{{}null{}}}.

If I don't set output and error streams;
{quote}//channelExec.setOut(mergedOutputStream);
//channelExec.setErr(mergedOutputStream);
channelExec.open.verify();
{quote}
Then, {{ChannelExec#getInvertedOut()}} and {{ChannelExec#getInvertedErr()}} return not {{{}null{}}}. But, streams are not merged.

How can I merge output and error streams of remote process ?

Thanks in advance!

  was:
Hello!

I want to merge output and error streams of remote process as {{java.lang.ProcessBuilder#redirectErrorStream(true)}} does.

If I set output and error streams;

{quote}channelExec.setOut(mergedOutputStream);
channelExec.setErr(mergedOutputStream);
channelExec.open.verify();{quote}

Then, {{ChannelExec#getInvertedOut()}} and {{ChannelExec#getInvertedErr()}} returns {{null}}.

If I don't set output and error streams;

{quote}//channelExec.setOut(mergedOutputStream);
//channelExec.setErr(mergedOutputStream);
channelExec.open.verify();{quote}

Then, {{ChannelExec#getInvertedOut()}} and {{ChannelExec#getInvertedErr()}} returns not {{null}}. But, streams are not merged.

How can I merge output and error streams of remote process ?

Thanks in advance!



> How to merge output and error streams of remote process ?
> ---------------------------------------------------------
>
>                 Key: SSHD-1276
>                 URL: https://issues.apache.org/jira/browse/SSHD-1276
>             Project: MINA SSHD
>          Issue Type: Question
>    Affects Versions: 2.8.0
>         Environment: Java SE 8, Apache NetBeans IDE 8.2
>            Reporter: dgü
>            Priority: Major
>
> Hello!
> I want to merge output and error streams of remote process as {{java.lang.ProcessBuilder#redirectErrorStream(true)}} does.
> If I set output and error streams;
> {quote}channelExec.setOut(mergedOutputStream);
> channelExec.setErr(mergedOutputStream);
> channelExec.open.verify();
> {quote}
> Then, {{ChannelExec#getInvertedOut()}} and {{ChannelExec#getInvertedErr()}} return {{{}null{}}}.
> If I don't set output and error streams;
> {quote}//channelExec.setOut(mergedOutputStream);
> //channelExec.setErr(mergedOutputStream);
> channelExec.open.verify();
> {quote}
> Then, {{ChannelExec#getInvertedOut()}} and {{ChannelExec#getInvertedErr()}} return not {{{}null{}}}. But, streams are not merged.
> How can I merge output and error streams of remote process ?
> Thanks in advance!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org