]> git.ipfire.org Git - thirdparty/chrony.git/commit
privops: stop helper on exit
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 8 Dec 2015 10:10:52 +0000 (11:10 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 8 Dec 2015 16:50:09 +0000 (17:50 +0100)
commit1b8ee3259ee42ec0fbc71eaac2aeb448a4abfcd6
treee6ebfe991fce162292ad85d6aff73aa3482c02fb
parentc7ae4940c384488995ebb9ffe08efd9804f78a37
privops: stop helper on exit

With SOCK_DGRAM sockets, the helper doesn't stop as there is no error
received when the socket is closed on the daemon side.

Add a QUIT operation to the protocol which is requested when the daemon
is exiting. It has no response. Register the stopping function with
atexit() to stop the helper even when the daemon is not exiting cleanly,
e.g. due to a fatal error.
privops.c