[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libssh channel_request_exec timeout
[Thread Prev] | [Thread Next]
- Subject: Re: libssh channel_request_exec timeout
- From: Konstantin Satunin <konstantin.satunin@xxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Thu, 25 Mar 2010 18:53:25 +0300
- To: libssh@xxxxxxxxxx
Hi Aris, Thank you for your quick response! Great to understand that there is blocking in channel_read function and it can be workarounded with channel_poll. I'll add this to my C++ wrapper! 2010/3/25 Aris Adamantiadis <aris@xxxxxxxxxxxx> > 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 > > > -- Best wishes Konstantin Satunin ICQ 592327 WWW http://mercenaries.net.ru
libssh channel_request_exec timeout | Konstantin Satunin <konstantin.satunin@xxxxxxxxx> |
Re: libssh channel_request_exec timeout | Aris Adamantiadis <aris@xxxxxxxxxxxx> |