Created attachment 223530 [details] daemon-add-priority.patch The attached patch adds arguments -e {priority}, -i {priority} for realtime and idle priorities respectively. These arguments can be used when the process should run with an altered priority level. rtprio(1) generally sets priority process level, but in case of daemon(8) invocation rtprio(1) can't be used as a separate command. Running 'rtprio {priority} daemon ... commmand ...' would also change daemon(8) process' priority which isn't what is desired. Running 'daemon ... rtprio {priority} command ...' can't generally work because daemon(8) can change process' user and rtprio(1) would fail.
Created attachment 223535 [details] daemon-add-priority.patch
Created attachment 223536 [details] daemon-add-priority.patch
Created attachment 223537 [details] daemon-add-priority.patch
I am working on daemon improvements and this feature is planned to be added once transition to kqueue is finished.
honestly, I think this feature belongs into rc, not into daemon.
I agree with Mina Galic. I would prefer having this feature in rc, alongside with another feature to set an arbitrary login-class (which would allow dynamic ressource management via rctl)