|
|
|
|
|
by alexk
4194 days ago
|
|
1. No if you don't call wait on child. Make sure to collect the status though in case if child has crashed for some reason otherwise you will end up with zombie: syscall.Wait4(-1, &wait, syscall.WNOHANG, nil)
I would also recommend to use a higer level StartProcess instead2. You can pass any arguments when starting a child, or even execute completely different binary: p, err := os.StartProcess(path, os.Args, &os.ProcAttr{
Dir: wd,
Env: os.Environ(),
Files: files,
Sys: &syscall.SysProcAttr{},
})
|
|