From 1621dc709bf2c689e066782312e160fd77283328 Mon Sep 17 00:00:00 2001 From: Saxon Nelson-Milton Date: Tue, 19 Sep 2023 10:45:45 +0000 Subject: [PATCH] vidforward: add SIGKILL to signal.Notify for term callback Just for further redundancy, let's also call the termination callback (which saves the manager state in our case) for SIGKILL. --- cmd/vidforward/notifier.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/vidforward/notifier.go b/cmd/vidforward/notifier.go index cb1415a8..e709c8a0 100644 --- a/cmd/vidforward/notifier.go +++ b/cmd/vidforward/notifier.go @@ -86,7 +86,7 @@ func (n *watchdogNotifier) notify() { go func() { sigs := make(chan os.Signal, 1) - signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM) + signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM, syscall.SIGKILL) sig := <-sigs n.log.Warning("received termination signal, calling termination callback", "signal", sig.String()) n.termCallback()