On Thursday, 9 February 2017 15:47:10 CET Wesley Witt wrote: > I'm just starting my use of libssh and am having problems reading output > from an executed command. I've read the docs & tutorials but haven't found > anything to address my problems. > > My basic sequence goes like this: > > 1: connect & auth > 2: ssh_channel_new, ssh_channel_open_session, ssh_channel_request_exec > 3: loop on ssh_channel_read_nonblocking to read all output resulting from > starting the command 4: ssh_channel_write to send some input to the > command. this results in the command generating some output response 5: > loop on ssh_channel_read_nonblocking to read all output resulting from > starting the command > > The problem is that at #5 there is no output data. If I sleep for 3 seconds > before reading the output then I get the output that I already read at #3. > > What am I doing wrong with this basic scenario?
Patches to improve the documentation are very welcome :) Andreas -- Andreas Schneider GPG-ID: CC014E3D www.cryptomilk.org a...@cryptomilk.org