Subject: Re: [patch] use poll when available on blocking API

Re: [patch] use poll when available on blocking API

From: Simon Josefsson <simon_at_josefsson.org>
Date: Tue, 23 Mar 2010 20:52:55 +0100

Paul Querna <paul_at_querna.org> writes:

> On Tue, Mar 23, 2010 at 6:37 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
>> On Tue, 23 Mar 2010, Simon Josefsson wrote:
>>
>>>> The attached patch uses poll inside _libssh2_wait_socket, and fixes
>>>> the issue for us.
>>>
>>> Thanks, I think the patch looks good.  Objections from anyone else?
>>
>> Looks fine to me. There's of course a missing piece for configure to do the
>> poll check - which reminds me that some systems have bad poll()
>> implementations that shouldn't be used so the configure check can't be too
>> simple.
>
> The configure.ac already has:
> AC_CHECK_FUNCS(poll gettimeofday select strtoll)

Right, I pushed your patch.

> So, HAVE_POLL is defined if it is available, but yes it likely needs
> to copy a blacklist from another project.......

Let's hope it doesn't make the libssh2 code too ugly... In other
projects I use gnulib to provide replacement functions for broken
systems, so the core code remains nice and clean, but libssh2's BSD
license makes it difficult to use here. Still, if we need something
like that, maybe we can adapt a similar approach, if possible.

/Simon
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-03-23