Similar to bug #361073 - I'd like a simple way to define service limits, for example postgres should not have any limits, but lighttpd shouldn't use more than 100MB. A variable in /etc/conf.d/$servicename would be most convenient, that way I could set ULIMIT="-m 100000" and have that service limited to 100M per process. System-wide limits are not that useful in this case, but as far as I remember the ulimit values are inherited to children, so anything started from the init script should inherit the given per-service limits.
doesnt pam already do this for you ?
This is already available. rc_ulimit="-m 100000" See the main rc.conf.
(In reply to comment #2) > This is already available. > > rc_ulimit="-m 100000" > > See the main rc.conf. As far as I can tell that's a global limit - if not then the documentation on it should be extended and a per-service example given.
The following is the section heading in rc.conf for the section where rc_ulimit is documented: ############################################################################## # SERVICE CONFIGURATION VARIABLES # These variables are documented here, but should be configured in # /etc/conf.d/foo for service foo and NOT enabled here unless you # really want them to work on a global basis. I do not see that there is anything for us to do for this bug.