94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
FD_COPY(&exceptFDs, &exceptFDs_);
#else
readFDs_ = readFDs;
writeFDs_ = writeFDs;
exceptFDs_ = exceptFDs;
#endif
time.tv_sec = timeout;
time.tv_usec = (timeout - time.tv_sec) * 1000;
if (select((int)maxFD + 1, &readFDs_, &writeFDs_, &exceptFDs_,
(timeout != -1 ? &time : NULL)) < 1)
return NO;
if (FD_ISSET(cancelFD[0], &readFDs_)) {
char buffer;
|
>
>
>
>
>
>
|
|
|
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
FD_COPY(&exceptFDs, &exceptFDs_);
#else
readFDs_ = readFDs;
writeFDs_ = writeFDs;
exceptFDs_ = exceptFDs;
#endif
/*
* We cast to int before assigning to tv_usec in order to avoid a
* warning with Apple GCC on PPC. POSIX defines this as suseconds_t,
* however, this is not available on Win32. As an int should always
* satisfy the required range, we just cast to int.
*/
time.tv_sec = (time_t)timeout;
time.tv_usec = (int)((timeout - time.tv_sec) * 1000);
if (select((int)maxFD + 1, &readFDs_, &writeFDs_, &exceptFDs_,
(timeout != -1 ? &time : NULL)) < 1)
return NO;
if (FD_ISSET(cancelFD[0], &readFDs_)) {
char buffer;
|