From 37d190817e18eddd8605d0fe7476b188dd3aafad Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 23 Feb 2001 00:46:28 +0000 Subject: Always increment even if the read fails (otherwise we spin if we hit the kernel bug...). Jeremy (This used to be commit d388dfa53b3a7a2dcce6d5591531d6ade0cbab62) --- source3/lib/select.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source3/lib/select.c') diff --git a/source3/lib/select.c b/source3/lib/select.c index c654a4a02c..396ecb5dd6 100644 --- a/source3/lib/select.c +++ b/source3/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; -- cgit