[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Help With Reading Output Data
[Thread Prev] | [Thread Next]
- Subject: Help With Reading Output Data
- From: Wesley Witt <wesw@xxxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Thu, 9 Feb 2017 15:47:10 +0000
- To: "libssh@xxxxxxxxxx" <libssh@xxxxxxxxxx>
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? -Wes
Re: Help With Reading Output Data | Andreas Schneider <asn@xxxxxxxxxxxxxx> |
Re: Help With Reading Output Data | Andreas Schneider <asn@xxxxxxxxxxxxxx> |