KillingSpark / rustysd

A service manager that is able to run "traditional" systemd services, written in rust
MIT License
506 stars 15 forks source link

Shutdown should honor dependencies #24

Closed KillingSpark closed 4 years ago

KillingSpark commented 4 years ago

Shutdown currently kills all services in no particular order. It should use deactivate_recursively() starting at the units that do not depend on anything.

nimaje commented 4 years ago

You mean 'starting at the units which aren't depended on by anything'? Else you would kill dependencies of running services which could lead to problems.

On 11.02.20 11:24, Moritz Borcherding wrote:

Shutdown currently kills all services in no particular order. It should use deactivate_recursively() starting at the units that do not depend on anything.

KillingSpark commented 4 years ago

I guess that was misleading. deactivate_recursively() already walks the dependency tree and deactivates depending units first (recursively, so in the end it does what you said it should do). So you want to call it on the units that do not depend on anything and let deactivate_recursively() do its thing.

KillingSpark commented 4 years ago

Should be fixed with 34a4c620392aa5ac2673274c20ddee3317224ec3