Add go-reaper integration for process reaping (#580)
* Add go-reaper integration for process reaping * refactor: move reaper initialization to cmd_linux.go
This commit is contained in:
parent
b3ce6b10c1
commit
22ad31b127
3 changed files with 10 additions and 0 deletions
|
|
@ -5,8 +5,14 @@ package main
|
|||
import (
|
||||
"os/exec"
|
||||
"syscall"
|
||||
|
||||
reaper "github.com/ramr/go-reaper"
|
||||
)
|
||||
|
||||
func init() {
|
||||
go reaper.Reap()
|
||||
}
|
||||
|
||||
func setPdeathsig(cmd *exec.Cmd) {
|
||||
cmd.SysProcAttr = &syscall.SysProcAttr{Pdeathsig: syscall.SIGTERM}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue