From 508125cbe26502c05f141b9170f47852748f87e6 Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Sun, 23 Mar 2008 11:24:55 -0400 Subject: [PATCH] src/ioset-select.c: Populate and use an fdset for FDs with exceptions. --- src/ioset-select.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/ioset-select.c b/src/ioset-select.c index 86b23f2..fce797b 100644 --- a/src/ioset-select.c +++ b/src/ioset-select.c @@ -36,7 +36,9 @@ extern int clock_skew; static struct io_fd **fds; static unsigned int fds_size; -static fd_set read_fds, write_fds; +static fd_set read_fds; +static fd_set write_fds; +static fd_set except_fds; static int ioset_select_init(void) @@ -61,6 +63,7 @@ ioset_select_remove(struct io_fd *fd, int closed) { FD_CLR(fd->fd, &read_fds); FD_CLR(fd->fd, &write_fds); + FD_CLR(fd->fd, &except_fds); (void)closed; } @@ -87,12 +90,11 @@ debug_fdsets(const char *msg, int nfds, fd_set *read_fds, fd_set *write_fds, fd_ struct timeval now; for (pos=ii=0; ii