1//go:build !windows23package agentrunner45import (6 "os/exec"7 "syscall"8)910func configureProcessGroup(command *exec.Cmd) {11 command.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}12}1314func terminateProcess(command *exec.Cmd) {15 if command.Process == nil {16 return17 }18 _ = syscall.Kill(-command.Process.Pid, syscall.SIGTERM)19 _ = syscall.Kill(-command.Process.Pid, syscall.SIGKILL)20 _ = command.Process.Kill()21}