snapd
snapd copied to clipboard
notices: Cancel notice waiting on terminating the daemon
Currently, if there is a program using the notices API and awaiting for notices, and the snapd daemon is killed (for example, because the snapd snap is being updated), the blocked socket keeps the termination process locked until a 25 seconds timeout fires. This delays for 25 seconds the termination of the daemon.
This patch detects when a SIGTERM or a SIGKILL signal is received, and breaks the waiting in the notices thread, thus ensuring that the termination process goes as quick as possible.
Thanks for helping us make a better snapd! Have you signed the license agreement and read the contribution guide?