//go:build linux package worker import ( "os/exec" "syscall" ) func configureProcess(command *exec.Cmd) { command.SysProcAttr = &syscall.SysProcAttr{Setpgid: true, Pdeathsig: syscall.SIGKILL} } func terminateProcessGroup(command *exec.Cmd) { if command.Process != nil { _ = syscall.Kill(-command.Process.Pid, syscall.SIGTERM) } } func killProcessGroup(command *exec.Cmd) { if command.Process != nil { _ = syscall.Kill(-command.Process.Pid, syscall.SIGKILL) _ = command.Process.Kill() } }