Bug 161401

Summary: [patch] have service(8) run scripts with the same resource limits as init(8)
Product: Base System Reporter: sigsys
Component: binAssignee: Allan Jude <allanjude>
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: allanjude, bdrewery
Priority: Normal    
Version: 8.2-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description sigsys 2011-10-08 21:00:04 UTC
init(8) runs /etc/rc (and /etc/rc.shutdown) with the resource limits of the "daemon" class. But starting/restarting a service with service(8) will lose those limits and the service will inherit the limits of the user issuing the command.

This feature doesn't seem well documented, but still I think it would make sense for service to do the same thing as init.
Comment 1 Bryan Drewery freebsd_committer freebsd_triage 2018-01-23 08:45:40 UTC
r288291 from a few years back effectively did the same thing.  All rc scripts are started with a minimum of 'limits -C daemon' now whether they are started at boot, /etc/rc.d/script cmd, or service.