diff options
author | David E. Cross <dec@FreeBSD.org> | 2001-03-08 13:57:41 +0000 |
---|---|---|
committer | David E. Cross <dec@FreeBSD.org> | 2001-03-08 13:57:41 +0000 |
commit | 57db636284f8b64e3d3b0b2a52e827afc2c487b3 (patch) | |
tree | b122ed4a1b6e154b07a705c4bf6a070da7bce7a6 /lib/libc/rpc | |
parent | 7e2f1eda7a6fdcbdf728876898dc9f892a302857 (diff) | |
download | src-57db636284f8b64e3d3b0b2a52e827afc2c487b3.tar.gz src-57db636284f8b64e3d3b0b2a52e827afc2c487b3.zip |
Submitted by: Ian Dowse <iedowse@maths.tcd.ie>, David Cross <dec@freebsd.org>
Reviewed by: David Cross <dec@freebsd.org>, jkh <jkh@freebsd.org>
Approved by: jkh <jkh@freebsd.org>
Obtained from: Ian Dowse <iedowse@maths.tcd.ie>, David Cross <dec@freebsd.org>
We have been running this patch on a production NIS server for 2.5 weeks now.
Normally we would have ypserv die at least once a week, and often many times
a day.
This patch treats and error from select as zeroing out the FD_SET to indicate
that no fds are ready for reading. This is safe because the rpc code
always re-inits the FDSET before calling select.
Notes
Notes:
svn path=/head/; revision=73991
Diffstat (limited to 'lib/libc/rpc')
-rw-r--r-- | lib/libc/rpc/svc_tcp.c | 1 | ||||
-rw-r--r-- | lib/libc/rpc/svc_unix.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/rpc/svc_tcp.c b/lib/libc/rpc/svc_tcp.c index b06099791f21..d7e425bf247d 100644 --- a/lib/libc/rpc/svc_tcp.c +++ b/lib/libc/rpc/svc_tcp.c @@ -354,6 +354,7 @@ readtcp(xprt, buf, len) tv = delta; /* in case _select() implements writeback */ switch (_select(svc_maxfd + 1, fds, NULL, NULL, &tv)) { case -1: + FD_ZERO(fds); if (errno != EINTR) goto fatal_err; gettimeofday(&tmp1, NULL); diff --git a/lib/libc/rpc/svc_unix.c b/lib/libc/rpc/svc_unix.c index ac92bc58a8b9..5e77c19287cc 100644 --- a/lib/libc/rpc/svc_unix.c +++ b/lib/libc/rpc/svc_unix.c @@ -396,6 +396,7 @@ readunix(xprt, buf, len) tv = delta; /* in case _select() implements writeback */ switch (_select(svc_maxfd + 1, fds, NULL, NULL, &tv)) { case -1: + FD_ZERO(fds); if (errno != EINTR) goto fatal_err; gettimeofday(&tmp1, NULL); |