diff options
| author | Junio C Hamano <gitster@pobox.com> | 2026-04-06 15:42:50 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-04-06 15:42:51 -0700 |
| commit | 87972f30017cc82ea9bab8e20e85bcf1fe84e1d2 (patch) | |
| tree | ad3428814b218490aa3dd5e85eb3f3f7f70a7c0d | |
| parent | a2dc76525117e69f19afb54fec298f3d9ef76499 (diff) | |
| parent | dd3693eb0859274d62feac8047e1d486b3beaf31 (diff) | |
| download | git-87972f30017cc82ea9bab8e20e85bcf1fe84e1d2.tar.xz | |
Merge branch 'aa/reap-transport-child-processes'
A few code paths that spawned child processes for network
connection weren't wait(2)ing for their children and letting "init"
reap them instead; they have been tightened.
* aa/reap-transport-child-processes:
transport-helper, connect: use clean_on_exit to reap children on abnormal exit
| -rw-r--r-- | connect.c | 4 | ||||
| -rw-r--r-- | transport-helper.c | 2 |
2 files changed, 6 insertions, 0 deletions
@@ -1054,6 +1054,8 @@ static struct child_process *git_proxy_connect(int fd[2], char *host) strvec_push(&proxy->args, port); proxy->in = -1; proxy->out = -1; + proxy->clean_on_exit = 1; + proxy->wait_after_clean = 1; if (start_command(proxy)) die(_("cannot start proxy %s"), git_proxy_command); fd[0] = proxy->out; /* read from proxy stdout */ @@ -1515,6 +1517,8 @@ struct child_process *git_connect(int fd[2], const char *url, } strvec_push(&conn->args, cmd.buf); + conn->clean_on_exit = 1; + conn->wait_after_clean = 1; if (start_command(conn)) die(_("unable to fork")); diff --git a/transport-helper.c b/transport-helper.c index 4d95d84f9e..570d7c6439 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -154,6 +154,8 @@ static struct child_process *get_helper(struct transport *transport) helper->trace2_child_class = helper->args.v[0]; /* "remote-<name>" */ + helper->clean_on_exit = 1; + helper->wait_after_clean = 1; code = start_command(helper); if (code < 0 && errno == ENOENT) die(_("unable to find remote helper for '%s'"), data->name); |
