snapd icon indicating copy to clipboard operation
snapd copied to clipboard

notices: Cancel notice waiting on terminating the daemon

Open sergio-costas opened this issue 9 months ago • 0 comments

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?

sergio-costas avatar May 10 '24 12:05 sergio-costas