diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-07-15 16:29:43 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-07-15 16:29:43 -0700 |
commit | 05920f041a57ac9ee86a8615cfca414450e65365 (patch) | |
tree | 0c79e5f67c6baa22073d8aaf8c9b57011c2adedd /git.c | |
parent | bd42bbe1a46c0fe486fc33e82969275e27e4dc19 (diff) | |
parent | c0d73a59c956ace5e02c9f0fab336ac4dbe64102 (diff) | |
download | git-05920f041a57ac9ee86a8615cfca414450e65365.tar.gz |
Merge branch 'ta/wait-on-aliased-commands-upon-signal' into master
When an aliased command, whose output is piped to a pager by git,
gets killed by a signal, the pager got into a funny state, which
has been corrected (again).
* ta/wait-on-aliased-commands-upon-signal:
Wait for child on signal death for aliases to externals
Wait for child on signal death for aliases to builtins
Diffstat (limited to 'git.c')
-rw-r--r-- | git.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -346,6 +346,8 @@ static int handle_alias(int *argcp, const char ***argv) commit_pager_choice(); child.use_shell = 1; + child.clean_on_exit = 1; + child.wait_after_clean = 1; child.trace2_child_class = "shell_alias"; argv_array_push(&child.args, alias_string + 1); argv_array_pushv(&child.args, (*argv) + 1); @@ -767,7 +769,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); |