fork bomb handling and gdb support
All checks were successful
Release / Build & publish (push) Successful in 7s
All checks were successful
Release / Build & publish (push) Successful in 7s
This commit is contained in:
20
runner/process_windows.go
Normal file
20
runner/process_windows.go
Normal file
@@ -0,0 +1,20 @@
|
||||
//go:build windows
|
||||
|
||||
package runner
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func setProcessGroup(cmd *exec.Cmd) {
|
||||
cmd.SysProcAttr = &syscall.SysProcAttr{
|
||||
CreationFlags: syscall.CREATE_NEW_PROCESS_GROUP,
|
||||
}
|
||||
}
|
||||
|
||||
func killProcessGroup(cmd *exec.Cmd) {
|
||||
if cmd.Process != nil {
|
||||
cmd.Process.Kill()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user