summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordec <dec@FreeBSD.org>2001-03-08 13:57:41 +0000
committerdec <dec@FreeBSD.org>2001-03-08 13:57:41 +0000
commitfb3c10a762deeff572628a061ab4ec8c9cd741ae (patch)
treecf069783cafd087a28677d0b4601c26de2c39ac6 /lib
parentd365bd24a59653eac550386e5aa6265b5ebc7bdd (diff)
downloadFreeBSD-src-fb3c10a762deeff572628a061ab4ec8c9cd741ae.zip
FreeBSD-src-fb3c10a762deeff572628a061ab4ec8c9cd741ae.tar.gz
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/rpc/svc_tcp.c1
-rw-r--r--lib/libc/rpc/svc_unix.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/rpc/svc_tcp.c b/lib/libc/rpc/svc_tcp.c
index b060997..d7e425b 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 ac92bc5..5e77c19 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);
OpenPOWER on IntegriCloud