Unregister all shutdown consumers when receiving SIGTERM
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>
Mon, 6 Aug 2012 12:06:43 +0000 (13:06 +0100)
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>
Mon, 6 Aug 2012 13:11:59 +0000 (14:11 +0100)
commit39dcfd5d9381c4494fad324b50588f9df1bc946e
tree2686371bdf2d15b81d709231e437e46ba330ace6
parent53d25fc8ddba4de1340cad4885ba9fce880bc3fe
Unregister all shutdown consumers when receiving SIGTERM

systemd uses SIGTERM to stop its units. We want to cleanly shut down
the NSC when receiving this signal. Part of that is to unregister all
shutdown consumers. If we don't do this, the NSM will later during its
shutdown phase call all shutdown consumers registered by the NSC. And
if the NSC was no longer running, this would cause the NSM to wait for a
timeout for every single one of these shutdown consumers. Obviously,
that is not desirable.
node-startup-controller/node-startup-controller-application.c