Subject: select() misbehaving whith NULL timeout in compat/linux32
To: None <port-amd64@NetBSD.org>
From: =?ISO-8859-1?Q?Edgar_Fu=DF?= <ef@math.uni-bonn.de>
List: port-amd64
Date: 03/15/2007 22:06:03
In compat/linux32/linux32_uinistd.c: linux32_select1, we have
} else {
timerclear(&utv);
}
error = selcommon(l, retval, nfds,
readfds, writefds, exceptfds, &utv, NULL);
which, in my opinon, should rather read
}
error = selcommon(l, retval, nfds,
readfds, writefds, exceptfds, timeout? &utv : NULL, NULL);
otherwise passing a NULL pointer as the timeout argument to select()
will time-out immediately instead of waiting indefinetly.
Indeed, I was wondering why the dsmc binary would flood my ktraces
with select calls on /amd64. On /i386, it behaves correctly.