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

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

From: Daniel Stenberg <>
Date: Tue, 23 Mar 2010 22:48:47 +0100 (CET)

On Tue, 23 Mar 2010, Simon Josefsson wrote:

I dug around in old mail archives to get some specifics to what we're trying
to avoid. It might be so that modern Mac OS X has a poll() that is good enough
to be used even though poll() still has serious quirks on that OS even though
we may never touch those. However, older versions of poll() was worse and in
general the function has a rather bad track record so I think it's safer to
just avoid it on macs.

> Hm, as far as I can tell, Daniel Mack says that poll ignores the timeout
> argument?

Yes, and that goes with older problems we've seen in curl when Mac OS ignored
the timeout argument. Some versions of poll() on Mac OS failed hard when we
used it with no file descriptors (basically doing a sub-second sleep). It
doesn't work on files in /dev. Earlier versions have an "inconsistent return
of POLLHUP where other implementations give POLLIN".

Received on 2010-03-23