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

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

From: Simon Josefsson <>
Date: Tue, 23 Mar 2010 21:12:33 +0100

Simon Josefsson <> writes:

> Paul Querna <> writes:
>> On Tue, Mar 23, 2010 at 6:37 PM, Daniel Stenberg <> 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 already has:
>> AC_CHECK_FUNCS(poll gettimeofday select strtoll)
> Right, I pushed your patch.

Hmm, the self test is hanging in poll when tearing down the channel now.
Is there some bad interaction between poll and a closed socket? Paul,
can you take a look? Try 'make check'.

Received on 2010-03-23