On Sun, Feb 17, 2013 at 12:20 PM, circuit6engineering
<[email protected]> wrote:
> The 'openfiles' resource limit set in login.conf doesn't seem to make it
> into the environment. For example:
>
> $ userinfo $USER | grep class
> class   staff
>
> $ getcap -f /etc/login.conf -s openfiles staff
> 1024
>
> $ ulimit -a | grep files
> nofiles(descriptors) 512

The fact that you only show lookups for "openfiles" makes me think
that you missed this text in the login.conf(5) manpage:

     The resource limit entries (cputime, filesize, datasize, stacksize,
     coredumpsize, memoryuse, memorylocked, maxproc, and openfiles) actually
     specify both the maximum and current limits (see getrlimit(2)).  The
     current limit is the one normally used, although the user is permitted to
     increase the current limit to the maximum limit.  The maximum and current
     limits may be specified individually by appending a -max or -cur to the
     capability name (e.g., openfiles-max and openfiles-cur).

The effect is that, after doing tc= expansion, it'll take the
openfiles or openfiles-cur that occurs _earlier_ in the expanded
entry.  So, what's the output of
    getcap -f /etc/login.conf -s openfiles staff
?


Philip Guenther

Reply via email to