Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2020-07-07 15:17:14 +0300
committerJunio C Hamano <gitster@pobox.com>2020-07-07 23:14:05 +0300
commite662df7e830a9d93ca36b74a7b5e670e139b0da1 (patch)
treed3a20d2fbe451823a1726578b7e240e45921d3c0 /git.c
parentaf6b65d45ef179ed52087e80cb089f6b2349f4ec (diff)
Wait for child on signal death for aliases to builtins
When you hit ^C all the processes in the tree receives it. When a git command uses a pager, git ignores this and waits until the pager quits. However, when using an alias there is an additional process in the tree which didn't ignore the signal. That caused it to exit which in turn caused the pager to exit. This fixes that for aliases to builtins. This was originally fixed in 46df6906 (execv_dashed_external: wait for child on signal death, 2017-01-06), but was broken by ee4512ed (trace2: create new combined trace facility, 2019-02-22) and then b9140840 (git: avoid calling aliased builtins via their dashed form, 2019-07-29). Signed-off-by: Trygve Aaberge <trygveaa@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git.c')
-rw-r--r--git.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/git.c b/git.c
index 7be7ad34bd..9b8d3c92e6 100644
--- a/git.c
+++ b/git.c
@@ -768,7 +768,7 @@ static int run_argv(int *argcp, const char ***argv)
* OK to return. Otherwise, we just pass along the status code.
*/
i = run_command_v_opt_tr2(args.argv, RUN_SILENT_EXEC_FAILURE |
- RUN_CLEAN_ON_EXIT, "git_alias");
+ RUN_CLEAN_ON_EXIT | RUN_WAIT_AFTER_CLEAN, "git_alias");
if (i >= 0 || errno != ENOENT)
exit(i);
die("could not execute builtin %s", **argv);