troglobit / finit

Fast init for Linux. Cookies included
https://troglobit.com/projects/finit/
MIT License
634 stars 63 forks source link

Add option to not kill process group on process exit #413

Open troglobit opened 1 month ago

troglobit commented 1 month ago

While working with avahi-autoipd we found that the deconf step did not execute properly when Finit sent the daemon process SIGTERM. This was caused by Finit cleaning up all lingering processes in that process group when the daemon PID exited, causing the /etc/avahi/avahi-autoipd.action script to be killed (-9) before completing.

In systemd land this can be controlled by the KillMode= switch, which default to cgroup:

service [2345] stop-type:mixed foo -n -- Example foo daemon

A Finit feature for this should at least support: pgroup (current), cgroup, and mixed style.

Related to: #412