Commit d2bbd5f7 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Ensure we reap child processes

parent d40a5a8f
...@@ -176,6 +176,7 @@ func handle_get_info_refs(gl_id string, _ string, path string, w http.ResponseWr ...@@ -176,6 +176,7 @@ func handle_get_info_refs(gl_id string, _ string, path string, w http.ResponseWr
fail_500(w, err) fail_500(w, err)
return return
} }
defer cmd.Wait()
// Start writing the response // Start writing the response
w.Header().Add("Content-Type", fmt.Sprintf("application/x-%s-advertisement", rpc)) w.Header().Add("Content-Type", fmt.Sprintf("application/x-%s-advertisement", rpc))
...@@ -240,6 +241,7 @@ func handle_post_rpc(gl_id string, rpc string, path string, w http.ResponseWrite ...@@ -240,6 +241,7 @@ func handle_post_rpc(gl_id string, rpc string, path string, w http.ResponseWrite
fail_500(w, err) fail_500(w, err)
return return
} }
defer cmd.Wait()
// Write the client request body to Git's standard input // Write the client request body to Git's standard input
if _, err := io.Copy(stdin, body); err != nil { if _, err := io.Copy(stdin, body); err != nil {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment