Hi

Is the command you run remotely via jsch writing to stderr?  You can check
that by running it manually and redirecting stdout to /dev/null

I recall the JSCH website has example code which reads the two streams out
separately. Try looking at that for a reference

If all else fails you'll need to share your code

-Keith Richardson

On Wednesday, September 28, 2016, Offer Baruch <offerbar...@gmail.com>
wrote:

> Really? no one? is this the right place to ask this?
>
> On Tue, Sep 6, 2016 at 12:47 PM, Offer Baruch <offerbar...@gmail.com
> <javascript:_e(%7B%7D,'cvml','offerbar...@gmail.com');>> wrote:
>
>> Hi everyone,
>>
>> We have been using JSCH for a long time now...
>> We are using an ChannelExec to run our commands.
>> Up until now we always read both the input and err streams and combined
>> their output into one string.
>>
>> We now want to split those streams into different strings and to allow
>> the calling program to decide what to do with each stream...
>> When i tried to debug this, i have found that reading from the input
>> stream returns back both stdout and stderr... in fact the err stream is
>> empty...
>> is this a known feature/bug?
>>
>> is there a proper way to do this?
>>
>> thanks in advance!
>> Offer Baruch
>>
>
>
------------------------------------------------------------------------------
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to