summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2010-07-15 18:44:58 +0000
committertrasz <trasz@FreeBSD.org>2010-07-15 18:44:58 +0000
commite3a946ddadfb17c53f9e7d4c6f30c03276892f96 (patch)
tree56ffeaf9a83c6c97512222192ff00e6828bafd98 /sys
parent7360e05689f88cd47f449fd516a35834c22aacb9 (diff)
downloadFreeBSD-src-e3a946ddadfb17c53f9e7d4c6f30c03276892f96.zip
FreeBSD-src-e3a946ddadfb17c53f9e7d4c6f30c03276892f96.tar.gz
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.
Diffstat (limited to 'sys')
-rw-r--r--sys/compat/svr4/svr4_filio.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/compat/svr4/svr4_filio.c b/sys/compat/svr4/svr4_filio.c
index 701bf15..58c6417 100644
--- a/sys/compat/svr4/svr4_filio.c
+++ b/sys/compat/svr4/svr4_filio.c
@@ -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);
}
OpenPOWER on IntegriCloud