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

Re: libssh channel_request_exec timeout


Hi Konstantin,

The channel_request_exec call is blocking until we have the answer from
the ssh server, but usually that's quite fast. There is no wait for
completion of the command. In order to wait for the completion of the
command, you have to do channel_read which itself can be made
nonblocking (using channel_poll).
Unfortunately there is nothing as simple as channel_read_timeout as you
suggest, at least for the moment.

Regards,

Aris

Konstantin Satunin a écrit :
> Hello, everyone!
> 
> I have a question! Is there any way to control timeout of execution
> commands on remote server with libssh?
> 
> For example when i call channel_request_exec function with some shell
> command i suppose that this call is blocking execution of my daemon for
> some time, but what if i want to limit that waiting time to something
> like 60 sec etc...
> 
> Can someone explain me how it could be achieved in libssh ?
> 
> -- 
> Best wishes
> Konstantin Satunin
> ICQ 592327
> WWW http://mercenaries.net.ru


Follow-Ups:
Re: libssh channel_request_exec timeoutKonstantin Satunin <konstantin.satunin@xxxxxxxxx>
References:
libssh channel_request_exec timeoutKonstantin Satunin <konstantin.satunin@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org