--- 2.4.9aa1/fs/select.c.~1~ Thu Aug 16 22:03:38 2001 +++ 2.4.9aa1/fs/select.c Fri Aug 17 06:17:55 2001 @@ -416,7 +416,7 @@ int nchunks, nleft; /* Do a sanity check on nfds ... */ - if (nfds > NR_OPEN) + if (nfds >= current->rlim[RLIMIT_NOFILE].rlim_cur) return -EINVAL; if (timeout) {