cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Yang Tse <yangsita_at_gmail.com>
Date: Sat, 17 Mar 2007 14:18:46 +0100

2007/3/16, Daniel Stenberg wrote:

> You mean one that would work more or less exactly like select(2) ?

Yes but using poll() underneath where supported.

> Why do we need our own version of that?

Well, after all we might not need it...

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().

hostares.c (line 147) and hostares.c (line 213)

Those two could be probably changed to Curl_select() without much hassle.

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.

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.

If any of those actually need to use select(2) then the need for a
Curl_select with five args that emulated it with poll() would be
needed.

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%.

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

-- 
-=[Yang]=-
Received on 2007-03-17