cURL / Mailing Lists / curl-library / Single Mail


Re: POSIX threaded DNS resolver - first experiences

From: Daniel Stenberg <>
Date: Sat, 24 Apr 2010 10:34:08 +0200 (CEST)

On Sat, 24 Apr 2010, Kamil Dudka wrote:

> You say there we need to "make sure that maxfd is bigger than -1". But in
> the code you intentionally do not in order to keep it working. What about
> updating all the comments like following?
> /* In a real-world program you OF COURSE check the return code of the function
> calls. On success, the value of maxfd is guaranteed to be greater or equal
> than than -1. We call select(maxfd + 1, ...), specially in case of
> (maxfd == -1), we call select(0, ...), which is basically equal to
> sleep. */

Yes I think that is a good idea. That seems like a better comment to use so
that it is made more obvious what happens in the -1 case.

List admin:
Received on 2010-04-24