cmd/fshim/ipc: install signal handler on shim start
All checks were successful
test / test (push) Successful in 20s

Getting killed at this point will result in inconsistent state.

Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
2024-11-18 13:33:46 +09:00
parent c026a4b5dc
commit ae2628e57a
2 changed files with 16 additions and 1 deletions

View File

@@ -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")
}
}
}