// Copyright F3 Authors
// SPDX-License-Identifier: MIT

//go:build !windows

package util

import (
	"os"
	"os/exec"
	"syscall"
)

func SetSysProcAttribute(cmd *exec.Cmd) {
	cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
}

func kill(p *os.Process) error {
	return syscall.Kill(-p.Pid, syscall.SIGKILL)
}
