[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Execution of invalid command doesn't return error


Thank you, I didn’t notice it.

Regards,
Bharathinandhan R

From: Franciszek Juras <franciszekjuras@xxxxxxxxx>
Sent: Friday, March 22, 2019 4:51 PM
To: libssh@xxxxxxxxxx
Subject: Re: Execution of invalid command doesn't return error

In function "int channel_read_buffer (ssh_channel channel, ssh_buffer buffer, uint32_t count, int is_stderr)" you need to pass 1 in place of is_stderr to read from stderr. Now you probably pass 0, thus you read from stdout. You need to read stdout and stderr separately.

FJ

pt., 22 mar 2019, 12:12 użytkownik BharathiNandhan Ranganathan <bharathiR@xxxxxxxxxxxxx<mailto:bharathiR@xxxxxxxxxxxxx>> napisał:
Hello,

     I working on GUI application and have been using libssh for a month now. As per online documentation I tried executing command through “ssh_channel_request_exec” function. It worked well when passed with valid command’s.
     When the function is executed with invalid commands such as “lsls -l”, it doesn’t capture/return error.
     Please let me know if am missing anything. The libssh version am working with is 0.7.6 under windows environment.

Regards,
Bharathinandhan R


References:
Execution of invalid command doesn't return errorBharathiNandhan Ranganathan <bharathiR@xxxxxxxxxxxxx>
Re: Execution of invalid command doesn't return errorFranciszek Juras <franciszekjuras@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org