From d0455f5b19ad50ba18f5859ffc07c0afd33da60e Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Fri, 15 Nov 2024 09:00:44 +0100 Subject: [PATCH] Don't abort on "down" when process doesn't exist --- setup.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.go b/setup.go index e49413d..bbf42f4 100644 --- a/setup.go +++ b/setup.go @@ -190,6 +190,11 @@ func netnsKillPids(netns string) { log.Printf(" Killing old PID %d", x) err := syscall.Kill(x, syscall.SIGTERM) if err != nil { + if err == syscall.ESRCH { + // When running multiple processes some might be already dead + log.Printf("failed to kill %d: %v (ignoring)", x, err) + continue + } log.Fatalf("failed to kill %d: %v", x, err) } // Also try SIGHUP to terminate shells which ignore SIGTERM -- 2.45.2