Bug 161401 - [patch] have service(8) run scripts with the same resource limits as init(8)
Summary: [patch] have service(8) run scripts with the same resource limits as init(8)
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 8.2-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Allan Jude
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-08 21:00 UTC by sigsys
Modified: 2018-01-23 08:45 UTC (History)
2 users (show)

See Also:


Attachments
file.diff (521 bytes, patch)
2011-10-08 21:00 UTC, sigsys
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.