Merge branch 'mk/http-backend-kill-children-before-exit'
authorJunio C Hamano <gitster@pobox.com>
Fri, 4 Jan 2019 21:33:34 +0000 (13:33 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 4 Jan 2019 21:33:35 +0000 (13:33 -0800)
The http-backend CGI process did not correctly clean up the child
processes it spawns to run upload-pack etc. when it dies itself,
which has been corrected.

* mk/http-backend-kill-children-before-exit:
http-backend: enable cleaning up forked upload/receive-pack on exit

1  2 
http-backend.c
diff --combined http-backend.c
index 9e894f197f91ee3565b0f3c618fdb4042e2f229f,ebf268cacebadeccf4cdc085e04b1af2b68120e2..29e68e38b5d5466126608642a96b9640aca44272
@@@ -486,6 -486,8 +486,8 @@@ static void run_service(const char **ar
        if (buffer_input || gzipped_request || req_len >= 0)
                cld.in = -1;
        cld.git_cmd = 1;
+       cld.clean_on_exit = 1;
+       cld.wait_after_clean = 1;
        if (start_command(&cld))
                exit(1);
  
@@@ -595,13 -597,13 +597,13 @@@ static void get_info_packs(struct strbu
        size_t cnt = 0;
  
        select_getanyfile(hdr);
 -      for (p = get_packed_git(the_repository); p; p = p->next) {
 +      for (p = get_all_packs(the_repository); p; p = p->next) {
                if (p->pack_local)
                        cnt++;
        }
  
        strbuf_grow(&buf, cnt * 53 + 2);
 -      for (p = get_packed_git(the_repository); p; p = p->next) {
 +      for (p = get_all_packs(the_repository); p; p = p->next) {
                if (p->pack_local)
                        strbuf_addf(&buf, "P %s\n", p->pack_name + objdirlen + 6);
        }