summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc/svc_run.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-12-31 09:13:59 +0000
committerpeter <peter@FreeBSD.org>1996-12-31 09:13:59 +0000
commita149001902e77319440f52679b2735834aef301a (patch)
treeeb49c98258c8b6cc82833bf5b03452c0857b82d0 /lib/libc/rpc/svc_run.c
parent3978edb06185caea67d3e22418453c2a4e3caa0b (diff)
downloadFreeBSD-src-a149001902e77319440f52679b2735834aef301a.zip
FreeBSD-src-a149001902e77319440f52679b2735834aef301a.tar.gz
use svc_maxfd + 1 in the select() call.
(There may be a behavior difference between the 2.1 and 2.2/3.0 kernels in this area, it seemed to work for me but I have a horribly hacked select() that might have a bug in the handling of this) Submitted by: wpaul
Diffstat (limited to 'lib/libc/rpc/svc_run.c')
-rw-r--r--lib/libc/rpc/svc_run.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/rpc/svc_run.c b/lib/libc/rpc/svc_run.c
index 0010f65..0311d8d 100644
--- a/lib/libc/rpc/svc_run.c
+++ b/lib/libc/rpc/svc_run.c
@@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)svc_run.c 1.1 87/10/13 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)svc_run.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$Id: svc_run.c,v 1.3 1996/06/10 00:49:19 jraynard Exp $";
+static char *rcsid = "$Id: svc_run.c,v 1.4 1996/12/30 15:14:29 peter Exp $";
#endif
/*
@@ -62,7 +62,7 @@ svc_run()
memcpy(fds, __svc_fdset, bytes);
} else
fds = NULL;
- switch (select(svc_maxfd, fds, NULL, NULL,
+ switch (select(svc_maxfd + 1, fds, NULL, NULL,
(struct timeval *)0)) {
case -1:
if (errno == EINTR) {
@@ -79,7 +79,7 @@ svc_run()
free(fds);
continue;
default:
- /* XXX What the hell?? what if fds == NULL?? */
+ /* if fds == NULL, select() can't return a result */
svc_getreqset2(fds, svc_maxfd + 1);
free(fds);
}
OpenPOWER on IntegriCloud