Open
Description
Hi,
runShellCommands
did not work for me, it hung on reading the output on the first command.
After reading the connection protocol specs and your implementation I'm almost convinced that the implementation cannot work for the following reasons:
- A shell is requested
- Some data is written to the channel as the "command"
readAllChannel
tries to read in 1KiB chunks until it reads an empty string
3.1. For each chunkreadChannelEx
calls intolibssh2_channel_read_ex
attempting to read 1KiB
3.2 This ends up eventually calling_libssh2_channel_read
which returns the number of bytes read
3.3 That function will only return 0 bytes only if the remote sent an EOF or the channel was closed, otherwise it will either read something or produce EAGAIN.
This loop would terminate only if an EOF was sent or the channel was closed.
Am I looking at this wrong?
Metadata
Assignees
Labels
No labels
Activity