Make svr4(4) version of poll(2) use the same limit of file descriptors as the

usual poll(2) does, instead of checking resource limits.
This commit is contained in:
Edward Tomasz Napierala 2010-07-15 18:44:58 +00:00
parent fcc06be1b2
commit c5dfcf4cc1

View File

@ -40,8 +40,6 @@ __FBSDID("$FreeBSD$");
#include <sys/poll.h>
#include <sys/malloc.h>
#include <sys/mutex.h>
#include <sys/resource.h>
#include <sys/resourcevar.h>
#include <sys/sysproto.h>
@ -67,8 +65,7 @@ svr4_sys_poll(td, uap)
u_long siz;
PROC_LOCK(td->td_proc);
if (uap->nfds > lim_cur(td->td_proc, RLIMIT_NOFILE) &&
uap->nfds > FD_SETSIZE) {
if (uap->nfds > maxfilesperproc && uap->nfds > FD_SETSIZE) {
PROC_UNLOCK(td->td_proc);
return (EINVAL);
}