fork bomb handling and gdb support
All checks were successful
Release / Build & publish (push) Successful in 7s

This commit is contained in:
2026-04-06 17:59:26 +03:00
parent c030d91911
commit 9b9a790618
4 changed files with 63 additions and 4 deletions

18
runner/process_unix.go Normal file
View File

@@ -0,0 +1,18 @@
//go:build !windows
package runner
import (
"os/exec"
"syscall"
)
func setProcessGroup(cmd *exec.Cmd) {
cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
}
func killProcessGroup(cmd *exec.Cmd) {
if cmd.Process != nil {
syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL)
}
}