From f080106e0ceddbe57c456c6a142c1074be51de32 Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Thu, 26 Mar 2026 20:12:43 +0000 Subject: [PATCH] Fix goose start up (bash -i -c ) Upon goose starts, the parent process spawn some child process and then dies, which caused the startup of the tool to fail if the sandbox was running with --unshare-pid. By running the command via "bash -i -c goose" the iteractive shell prevents it from exiting and goose starts normally. This patch implements that "hack", so all tools can be used with --unshare-pid. Signed-off-by: Lucas Alvares Gomes --- cmd/bwai/main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/bwai/main.go b/cmd/bwai/main.go index a60063e..73a966e 100644 --- a/cmd/bwai/main.go +++ b/cmd/bwai/main.go @@ -7,7 +7,6 @@ import ( "os" "os/exec" "path/filepath" - "strings" ) func main() { @@ -58,7 +57,7 @@ func main() { command := cfg.Command if *commandFlag != "" { - command = strings.Fields(*commandFlag) + command = []string{"bash", "-i", "-c", *commandFlag} } fmt.Printf("bwai: sandboxed in %s\n", currentDir)