diff options
author | Peter Wemm <peter@FreeBSD.org> | 1996-12-31 09:13:59 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 1996-12-31 09:13:59 +0000 |
commit | e85cee866de3da90da9c04874ed2fd5243ce0b6c (patch) | |
tree | eb49c98258c8b6cc82833bf5b03452c0857b82d0 /lib | |
parent | 91f0745a288d95056b96071a64fed329eb30cbb1 (diff) | |
download | src-e85cee866de3da90da9c04874ed2fd5243ce0b6c.tar.gz src-e85cee866de3da90da9c04874ed2fd5243ce0b6c.zip |
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
Notes
Notes:
svn path=/head/; revision=21127
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/rpc/svc_run.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/rpc/svc_run.c b/lib/libc/rpc/svc_run.c index 0010f65f61b3..0311d8d6a517 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); } |