Menu

#554 curl_multi_fdset: max_fd will contain -1

closed-wont-fix
libcurl (356)
2
2013-06-21
2005-11-24
No

Hi,

man select

> n is the highest-numbered descriptor in any of the
three sets, plus 1.

http://curl.haxx.se/libcurl/c/curl_multi_fdset.html

> If no file descriptors are set by libcurl, max_fd
will contain -1 when this function returns.

Shouldn't this be 0 instead of -1?
And wouldn't it be better to use max_fd as in in/out
param so it can be easier used with multiple calls to
curl_multi_fdset?

Discussion

  • Olaf van der Spek

    Logged In: YES
    user_id=30264

    Nevermind about the max_fd issue, you're supposed to add 1
    before you call select.
    The out vs in/out issue still stands.

     
  • Daniel Stenberg

    Daniel Stenberg - 2005-11-24
    • milestone: --> new_feature_request
    • priority: 5 --> 2
     
  • Daniel Stenberg

    Daniel Stenberg - 2005-11-24

    Logged In: YES
    user_id=1110

    Perhaps, but this is the API as it works today and it seems
    like a very minor change that would have a serious impact on
    all existing applications using this function.

     
  • Daniel Stenberg

    Daniel Stenberg - 2005-11-25
    • status: open --> closed-wont-fix
     
MongoDB Logo MongoDB