Now have been moved to kexec
This lib is not maintained any more. !!!
This is a golang lib, offer a better way to kill all child process.
Tested on windows, linux, darwin.
This lib has been used in fswatch.
go get -v github.com/codeskyblue/kproc
example:
func main() {
p := kproc.ProcString("python flask_main.py")
p.Start()
time.Sleep(3 * time.Second)
err := p.Terminate(syscall.SIGKILL)
if err != nil {
log.Println(err)
}
}