[ 
https://issues.apache.org/jira/browse/SSHD-1301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17618275#comment-17618275
 ] 

dgü commented on SSHD-1301:
---------------------------

I think it's not suitable to thow an exception in 
{_}ClientSession#createExecChannel(String){_}. Because, it doesn't wait for the 
completion of command. So, getting exit value cannot be available.

Thank you..

> No exception is thrown if nonexistent command name is executed by ChannelExec
> -----------------------------------------------------------------------------
>
>                 Key: SSHD-1301
>                 URL: https://issues.apache.org/jira/browse/SSHD-1301
>             Project: MINA SSHD
>          Issue Type: Question
>    Affects Versions: 2.9.1
>         Environment: Java 8
>            Reporter: dgü
>            Priority: Major
>
> Hello!
> If i execute a remote Linux command such as _ls_ by 
> {_}org.apache.sshd.client.session.ClientSession#createExecChannel(String){_}, 
> it works successfully and _ChannelExec#getExitStatus()_ returns 0.
> If I execute a nonexistent remote comman such as {_}xxx{_}, it doesn't throw 
> an exception, _ChannelExec#getExitStatus()_ returns 127 and error stream 
> includes _bash: xxx: command not found_
> is this expected behaviour ? if it is expected behavior, it is possible to 
> throw an exception after executing remote command if exit code of 0 is a 
> result of successful execution.
> Thanks in advance...



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

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

Reply via email to