gunk-dev/the-valley

supervise_other.go

sourcef007964e2f86main's published tip history
428 bytes
1//go:build !linux
2
3package exporttest
4
5import "syscall"
6
7// sysProcAttr puts a program in a process group of its own.
8func sysProcAttr() *syscall.SysProcAttr {
9 return &syscall.SysProcAttr{Setpgid: true}
10}
11
12// killSession kills the process group sid.
13func killSession(sid int) { syscall.Kill(-sid, syscall.SIGKILL) }
14
15// watch and unwatch do nothing here: there is no watchdog.
16func watch(sid int) {}
17func unwatch(sid int) {}