version 1.2, 2007/05/25 18:35:07
|
version 1.2.10.1, 2008/02/06 20:41:55
|
|
|
/* | /* |
**============================================================================== | **============================================================================== |
** | ** |
** _waitForReadEnable() |
** WaitForReadEnable() |
** | ** |
** Wait until the given socket is read-enabled. Returns 1 if read enabled | ** Wait until the given socket is read-enabled. Returns 1 if read enabled |
** and 0 on timed out. | ** and 0 on timed out. |
|
|
**============================================================================== | **============================================================================== |
*/ | */ |
| |
static int _waitForReadEnable(int sock, long timeoutMsec) |
int WaitForReadEnable(int sock, long timeoutMsec) |
{ | { |
struct timeval timeout; | struct timeval timeout; |
| |
|
|
| |
while (r) | while (r) |
{ | { |
int status = _waitForReadEnable(sock, TIMEOUT_MSEC); |
int status = WaitForReadEnable(sock, TIMEOUT_MSEC); |
ssize_t n; | ssize_t n; |
| |
if ((globals.signalMask & (1 << SIGTERM)) || | if ((globals.signalMask & (1 << SIGTERM)) || |