This month's Index
Subject: Re: When does read block?
Re: When does read block?
From: Peter Stuge <peter_at_stuge.se>
Date: Thu, 17 May 2012 15:02:22 +0200
Seth Willits wrote:
When libssh2_channel_eof() returns true. Never otherwise.
> I figured eof and read returning 0 would go hand in hand,
That's not correct. As the man page for libssh2_channel_read
> I would have figured that, like in the above example, if read
No. The example you showed demonstrated that when a channel is EOF
> I've noticed it does depend on the command I'm running though.
Obviously. Different commands close their output at different times.
> (Looking at the server, cat isn't still running.)
If the channel was used for executing a single program and that
> Is this a difference of whether or not the remote program actually
As you probably know a file descriptor (like stdout) always belongs
> (Really this more of a curiosity than a necessity to know because
Sorry, but that's not correct. Please look at the documentation