Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Jul 2010 18:44:59 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r210132 - head/sys/compat/svr4
Message-ID:  <201007151844.o6FIixDP069732@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Thu Jul 15 18:44:58 2010
New Revision: 210132
URL: http://svn.freebsd.org/changeset/base/210132

Log:
  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.

Modified:
  head/sys/compat/svr4/svr4_filio.c

Modified: head/sys/compat/svr4/svr4_filio.c
==============================================================================
--- head/sys/compat/svr4/svr4_filio.c	Thu Jul 15 17:49:35 2010	(r210131)
+++ head/sys/compat/svr4/svr4_filio.c	Thu Jul 15 18:44:58 2010	(r210132)
@@ -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);
      }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007151844.o6FIixDP069732>