troglobit / finit

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

Regression stopping a process and its group #355

Closed troglobit closed 1 year ago

troglobit commented 1 year ago

In https://github.com/troglobit/finit/commit/91a9c83928349a9c36acf34b1d2f222328a06a1d a regression was introduced that affects the way Finit stops a supervised process and its process group.

Instead of sending SIGTERM to the process, delegating the responsibility to that process to inform any children it may have, Finit after that commit sends SIGTERM to the entire process group.

For SIGKILL this is fine, SIGKILL only runs as cleanup and as a last ditch effort if the process doesn't respond to SIGTERM. Hence, the git comment about cleaning up any lingering logit, would be taken care of by the cleanup phase.

This regression, introduced in v3.2, directly affects services like avahi-autoipd that have forked off children that it needs to tell to exit cleanly before it returns. With the patch in question these children are never allowed to complete, which in turn causes missing cleanup of 169.254 link-local addresses on interfaces.