Commit c08b8fae authored by Jacob Vosmaer's avatar Jacob Vosmaer

Use SIGTERM on the process group when aborting

After reading the curious Git repository corruption report in
https://gitlab.com/gitlab-org/gitlab-ce/issues/2336 (where
gitlab-git-http-server was NOT being used, for the record), I feel
inclined to be a little more cautious and use SIGTERM instead of
SIGKILL to terminate the git-xxx-pack process group in case of
aborted requests.

Also discussed in
https://gitlab.com/gitlab-org/gitlab-git-http-server/issues/1 .
parent 49187702
......@@ -276,8 +276,8 @@ func cleanUpProcessGroup(cmd *exec.Cmd) {
process := cmd.Process
if process != nil && process.Pid > 0 {
// Send SIGKILL (kill -9) to the process group of cmd
syscall.Kill(-process.Pid, syscall.SIGKILL)
// Send SIGTERM to the process group of cmd
syscall.Kill(-process.Pid, syscall.SIGTERM)
}
// reap our child process
......
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