This month's Index
Subject: Re: libssh2_session_free changes nonblock state of already unused fd
Re: libssh2_session_free changes nonblock state of already unused fd
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 28 Oct 2011 11:42:25 +0200 (CEST)
On Fri, 28 Oct 2011, Pavel Strashkin wrote:
> You're correct, but as i said we have the deal with a Perl, Python, whatever
It guarantees a lot and please don't come blaming the language for this bug.
The socket is not yours to close as long as you've handed it over to libssh2
> In this world you should you take care of it too (in case if it happens). My
Why not? You hand over the socket to the library to do SSH operations on it.
> You have the stream (socket) and the only thing which you should have to do
That's an easy thing to say from an outsider's perspective before you have
> How it happens - async or blocking - is not up to library. I mean you have
No, we don't. We always and unconditionally use the socket set to non-blocking
> This small change will make life easier i believe.
I disagree. This non-blocking issue is what made you notice your bug. You
-- / daniel.haxx.se _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-develReceived on 2011-10-28