diff -urN 2.2.20pre9/fs/select.c poll-nfds/fs/select.c --- 2.2.20pre9/fs/select.c Thu May 4 13:00:40 2000 +++ poll-nfds/fs/select.c Sat Aug 18 03:17:26 2001 @@ -412,7 +412,7 @@ lock_kernel(); /* Do a sanity check on nfds ... */ err = -EINVAL; - if (nfds > current->files->max_fds) + if (nfds > current->rlim[RLIMIT_NOFILE].rlim_cur) goto out; if (timeout) {