cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Which name for a 5 argument Curl_select() ?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 17 Mar 2007 16:15:17 +0100 (CET)

On Sat, 17 Mar 2007, Yang Tse wrote:

> If I haven't missed any at least we still have five calls in the library to
> select(2). Those calls are not being granted the poll() benefits that
> Curl_select() provides for systems that have a fine poll().

Ah right, indeed they should be addressed!

> hostares.c (line 147) and hostares.c (line 213)
>
> Those two could be probably changed to Curl_select() without much hassle.

Yeps.

> easy.c (line 420)
>
> This one could also be probably changed to Curl_select() since current
> implementation of curl_multi_fdset() actually doesn't use the error or
> exception fd_set.

Indeed! And the code isn't even currently in use... Although we should try to
keep it working as I still plan and hope to switch to that one day in the
future.

> An now something similar in c-ares...
>
> adig.c (line 286) and ahost.c (line 140)
>
> This two would benefit from the implementation of an ares_select() similar
> to the Curl_select() one.

Yeah, but those two are more like example applications in my eyes so I don't
think they need to have a perfect implementation for the code that is outside
of c-ares.

To clarify: those source files are not part of the c-ares library.

> Do you think its safe to use current Curl_select for these five cases
> ? I don't think anything would break, but not sure 100%.

They are only three cases in libcurl, and all three could easily use
Curl_select().

> Ok to make a patch replacing current calls of select(2) with Curl_select()
> and test it on the autobuilds ?

indeed!

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-03-17