mirror of https://github.com/perkeep/perkeep.git
cgi: wait on subprocess exit code, no zombies.
This commit is contained in:
parent
7c9400ac7f
commit
0baf46c69a
|
@ -92,9 +92,9 @@ func (h *CgiHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
defer func() {
|
defer func() {
|
||||||
// TODO: close subprocess somehow? No kill?!
|
|
||||||
cmd.Stdin.Close()
|
cmd.Stdin.Close()
|
||||||
cmd.Stdout.Close()
|
cmd.Stdout.Close()
|
||||||
|
cmd.Wait(0) // no zombies
|
||||||
}()
|
}()
|
||||||
|
|
||||||
if req.ContentLength != 0 {
|
if req.ContentLength != 0 {
|
||||||
|
|
Loading…
Reference in New Issue