Subject: Re: Changing proc.curproc.rlimit.datasize.soft silently fails under
To: Brian Buhrow <buhrow@lothlorien.nfbcal.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: current-users
Date: 10/04/2007 11:57:44
On Thu, 4 Oct 2007, Brian Buhrow wrote:

> Hello.  I just noticed the following behavior under NetBSD-3.x.  Wondering
> if anyone can say whether this is a bug or a feature?  I would think that
> if the variable is read-only, it should show an error message, yes?  If
> it's read-write, why does the change not stick?  Should I report this as a
> bug?
> -thanks
> -Brian
> 
> www# sysctl -a |grep 'datasize'
> proc.curproc.rlimit.datasize.soft = 134217728
> proc.curproc.rlimit.datasize.hard = 2147483647
> www# /etc/rc.d/sysctl start
> Setting sysctl variables:
> proc.curproc.rlimit.datasize.soft: 134217728 -> 268435456

Do you have proc.curproc.rlimit.datasize.soft in your sysctl.conf?

Note that "curproc" is for the current process. So it changed it for that, 
not the shell you are running in. The sysctl(8) man page doesn't say much 
but gives a hint "... will not have the desired effect."

> www# !sysctl
> sysctl -a | grep 'datasize'
> proc.curproc.rlimit.datasize.soft = 134217728
> proc.curproc.rlimit.datasize.hard = 2147483647
> www# exit


  Jeremy C. Reed