return FALSE;
}
- } while((rc == -1) && ((error = errno) == EINTR));
+ } while((rc == -1) && ((error = SOCKERRNO) == EINTR));
if(rc < 0) {
logmsg("select() failed with error: (%d) %s",
- error, strerror(error));
+ error, sstrerror(error));
return FALSE;
}
logmsg("signalled to die, exiting...");
return FALSE;
}
- } while((rc == -1) && ((error = errno) == EINTR));
+ } while((rc == -1) && ((error = SOCKERRNO) == EINTR));
if(rc < 0) {
logmsg("select() failed with error: (%d) %s",
logmsg("Got %zu bytes from client", got);
}
- if((got == -1) && ((EAGAIN == errno) || (EWOULDBLOCK == errno))) {
+ if((got == -1) && ((SOCKERRNO == EAGAIN) ||
+ (SOCKERRNO == EWOULDBLOCK))) {
int rc;
fd_set input;
fd_set output;
do {
logmsg("Wait until readable");
rc = select((int)sock + 1, &input, &output, NULL, &timeout);
- } while(rc < 0 && errno == EINTR && !got_exit_signal);
+ } while(rc < 0 && SOCKERRNO == EINTR && !got_exit_signal);
logmsg("readable %d", rc);
if(rc)
got = 1;
do {
rc = select((int)maxfd + 1, &input, &output, NULL, &timeout);
- } while(rc < 0 && errno == EINTR && !got_exit_signal);
+ } while(rc < 0 && SOCKERRNO == EINTR && !got_exit_signal);
if(got_exit_signal)
break;
do {
rc = select((int)maxfd + 1, &input, &output, NULL, &timeout);
- } while(rc < 0 && errno == EINTR && !got_exit_signal);
+ } while(rc < 0 && SOCKERRNO == EINTR && !got_exit_signal);
if(got_exit_signal)
goto sws_cleanup;