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