From ae2628e57a25e86568fe00281f07cecfa103cde4 Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Mon, 18 Nov 2024 13:33:46 +0900 Subject: cmd/fshim/ipc: install signal handler on shim start Getting killed at this point will result in inconsistent state. Signed-off-by: Ophestra Umiker --- internal/app/start.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'internal') diff --git a/internal/app/start.go b/internal/app/start.go index 0b90583a..c33d26fb 100644 --- a/internal/app/start.go +++ b/internal/app/start.go @@ -179,7 +179,11 @@ func (a *app) Wait() (int, error) { // alternative exit path when kill was unsuccessful case err := <-a.shim.WaitFallback(): r = 255 - fmsg.Printf("cannot terminate shim on faulted setup: %v", err) + if err != nil { + fmsg.Printf("cannot terminate shim on faulted setup: %v", err) + } else { + fmsg.VPrintln("alternative exit path selected") + } } } -- cgit v1.3.1