From fb532206b36368b02fd91f17fb05b2802f63b55b Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Tue, 28 Apr 2026 12:22:09 +0200 Subject: [PATCH] Revert "use process group kill" This reverts commit a869bb51660091cfc5c39b0226b9775ce62fb687. --- tests/ocwrapper/opencloud/opencloud.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/tests/ocwrapper/opencloud/opencloud.go b/tests/ocwrapper/opencloud/opencloud.go index fcd822c494..86e0ac8379 100644 --- a/tests/ocwrapper/opencloud/opencloud.go +++ b/tests/ocwrapper/opencloud/opencloud.go @@ -43,10 +43,6 @@ func Start(envMap []string) { } else { cmd.Env = append(os.Environ(), envMap...) } - // Start the command in a new process group to be able to kill it and all its children - cmd.SysProcAttr = &syscall.SysProcAttr{ - Setpgid: true, - } logs, err := cmd.StderrPipe() if err != nil { @@ -125,12 +121,7 @@ func Stop() (bool, string) { return true, "OpenCloud server is not running" } - // kill the process group to stop the server and all its children - if cmd.Process != nil { - syscall.Kill(-cmd.Process.Pid, syscall.SIGTERM) - time.Sleep(10 * time.Second) - syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL) - } + exec.Command("sh", "-c", "pkill -9 -f 'opencloud|nats-server' 2>/dev/null || true").Run() cmd = nil return true, "OpenCloud server stopped successfully"