From 3f465ba8676493dcd39a8738142428ddf14c8eb5 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Fri, 10 Jul 2026 17:09:42 +0900 Subject: [PATCH] Avoid nil process deref on early ctrlc --- client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client.go b/client.go index 83215ac..be85141 100644 --- a/client.go +++ b/client.go @@ -63,6 +63,9 @@ func client(addr string, args []string) int { case "close": inw.Close() case "ctrlc": + if cmd.Process == nil { + continue + } if runtime.GOOS == "windows" { // windows doesn't support os.Interrupt exec.Command("taskkill", "/F", "/T", "/PID", fmt.Sprint(cmd.Process.Pid)).Run()