From 1a3278910f16fb56d87b4751a897f035761958ff Mon Sep 17 00:00:00 2001 From: "Taylor R. Campbell" Date: Sun, 29 Oct 2006 16:43:38 +0000 Subject: [PATCH] Fix bug in calling select(2): its first argument is one greater than the highest file descriptor involved, _not_ the number of file descriptors involved. --- v7/src/microcode/uxio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v7/src/microcode/uxio.c b/v7/src/microcode/uxio.c index c68468725..46c39eb55 100644 --- a/v7/src/microcode/uxio.c +++ b/v7/src/microcode/uxio.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: uxio.c,v 1.53 2005/07/24 05:06:40 cph Exp $ +$Id: uxio.c,v 1.54 2006/10/29 16:43:38 riastradh Exp $ Copyright 1990,1991,1992,1993,1994,1995 Massachusetts Institute of Technology Copyright 1996,1997,1998,2000,2001,2003 Massachusetts Institute of Technology @@ -705,7 +705,7 @@ DEFUN (OS_test_select_descriptor, (fd, blockp, mode), (nfds, ((OS_process_any_status_change ()) ? ((errno = EINTR), (-1)) - : (UX_select (1, + : (UX_select ((fd + 1), (&readable), (&writeable), 0, -- 2.25.1