summaryrefslogtreecommitdiffstats
path: root/source/lib/select.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-02-23 00:46:28 +0000
committerJeremy Allison <jra@samba.org>2001-02-23 00:46:28 +0000
commitd388dfa53b3a7a2dcce6d5591531d6ade0cbab62 (patch)
tree18ba897ec04b9abf4afe6d5b667833b33de27fde /source/lib/select.c
parentc3930c6bdb05f919e27b9b7f0b2e2f83a78de51a (diff)
downloadsamba-d388dfa53b3a7a2dcce6d5591531d6ade0cbab62.tar.gz
samba-d388dfa53b3a7a2dcce6d5591531d6ade0cbab62.tar.xz
samba-d388dfa53b3a7a2dcce6d5591531d6ade0cbab62.zip
Always increment even if the read fails (otherwise we spin if we hit the kernel bug...).
Jeremy
Diffstat (limited to 'source/lib/select.c')
-rw-r--r--source/lib/select.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/lib/select.c b/source/lib/select.c
index c654a4a02ca..396ecb5dd6b 100644
--- a/source/lib/select.c
+++ b/source/lib/select.c
@@ -98,7 +98,10 @@ int sys_select(int maxfd, fd_set *fds,struct timeval *tval)
while (pipe_written != pipe_read) {
char c;
- if (read(select_pipe[0], &c, 1) == 1) pipe_read++;
+ /* Due to the linux kernel bug in 2.0.x, we
+ * always increment here even if the read failed... */
+ read(select_pipe[0], &c, 1);
+ pipe_read++;
}
errno = saved_errno;