threefoldtech / zinit

A init replacement that feels like runit written in rust+tokio
Apache License 2.0
10 stars 1 forks source link

Start child processes in it's own group #38

Closed muhamadazmy closed 2 years ago

muhamadazmy commented 2 years ago

This make it easier for the zinit signal/stop to stop the entire process group instead of the direct child.

This is needed if your service is a process that starts more processes. For example, a bash script that starts sub processes. On stop the signal is sent to your direct child only, which will make this child process only to stop which is bad. Starting the child instead in its own group, all it's children will also be in that process group. Hence a killpg will send the signal to all processes in that group.