diff options
author | Gisle Vanem <gvanem@broadpark.no> | 2005-01-15 09:26:07 +0000 |
---|---|---|
committer | Gisle Vanem <gvanem@broadpark.no> | 2005-01-15 09:26:07 +0000 |
commit | f5b8a26d9ad360680686e6eb7d21538a2e0f8758 (patch) | |
tree | c5bef0d52b83ab3cd242f5c85e627dd046bfa01d /lib | |
parent | cf51f7fb65ad68cacc05e451c6a113f7c84c2da6 (diff) |
errrno can by freak accident become EINTR on DOS or
Windows (unrelated to select). select() can never set errno
to EINTR on Windows.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/select.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/select.c b/lib/select.c index 3a1b6bc44..5bd8ea466 100644 --- a/lib/select.c +++ b/lib/select.c @@ -39,13 +39,17 @@ #error "We can't compile without select() support!" #endif -#include "select.h" - #ifdef __BEOS__ /* BeOS has FD_SET defined in socket.h */ #include <socket.h> #endif +#include <curl/curl.h> + +#include "urldata.h" +#include "connect.h" +#include "select.h" + #ifdef WIN32 #define VALID_SOCK(s) (1) /* Win-sockets are not in range [0..FD_SETSIZE> */ #else @@ -148,7 +152,7 @@ int Curl_select(curl_socket_t readfd, curl_socket_t writefd, int timeout_ms) do { r = select(maxfd + 1, &fds_read, &fds_write, &fds_err, &timeout); - } while((r == -1) && (errno == EINTR)); + } while((r == -1) && (Curl_ourerrno() == EINTR)); if (r < 0) return -1; @@ -233,7 +237,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms) do { r = select(maxfd + 1, &fds_read, &fds_write, &fds_err, ptimeout); - } while((r == -1) && (errno == EINTR)); + } while((r == -1) && (Curl_ourerrno() == EINTR)); if (r < 0) return -1; |