Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Feb 1995 23:12:40 -0800
From:      David Greenman <davidg@Root.COM>
To:        Wankle Rotary Engine <wpaul@skynet.ctr.columbia.edu>
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: getrlimit()/setrlimit() strangeness 
Message-ID:  <199502200712.XAA01992@corbin.Root.COM>
In-Reply-To: Your message of "Mon, 20 Feb 95 01:56:03 EST." <199502200656.BAA02173@skynet.ctr.columbia.edu> 

next in thread | previous in thread | raw e-mail | index | archive | help
>getrlimit() reported that the soft file descriptor limit was 128 (which
>is correct) and that the hard limit was -1 (which is thoroughly bogus).

   Actually, no, it isn't. -1 is RLIM_INFINITY which is documented in the
manual page. It simply means that there isn't a per-process hard limit. Since
the per-process maximum limit isn't being exceeded, the setrlimit must succeed
without error. The only real bug here is that the rlim_max isn't set to 
something like 1024. In addition, the current way that 'maxfiles' (the maximum
number of open files on the system) is calculated is bogus and should be an
absolute value rather than based on the maximum number of processes.

-DG



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