Subject: Re: per process file descriptor limit
To: None <netbsd-users@netbsd.org>
From: Christian Biere <christianbiere@gmx.de>
List: netbsd-users
Date: 02/04/2007 17:06:23
Milos Negovanovic wrote:
> I am wondering what is the right way to set per process file descriptor
> limit? I have "ulimit -n 2048" in shell's rc file but it doesn't seem to
> have any effect:
 
> milosn@piccolo ~ $ sysctl -w proc.$$.rlimit.descriptors.soft=501
> sysctl: proc.335.rlimit.descriptors.soft: sysctl() failed with Invalid
> argument
 
> 500 is some limit hardcoded somewhere i presume.

I'm not sure but I think this a system-dependent default value. The
right place to edit defaults for these resource limits would be
/etc/login.conf, see login.conf(5). As a non-root user you cannot
increase these limits beyond their hard limit, so trying to do this
from the shell or the shell configuration file won't help. You can
only lower them.

-- 
Christian