summaryrefslogtreecommitdiff
path: root/run-command.c
diff options
context:
space:
mode:
authorClemens Buchacher <drizzd@aon.at>2012-01-08 20:41:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-01-08 23:07:20 (GMT)
commit10c6cddd928b24ac6030a172c6c7b46efb32aedc (patch)
tree40646622d4b49b72f99de44b4f6519ff65972203 /run-command.c
parentafe19ff7b55129d988e421ae1e0df4ec9659787a (diff)
downloadgit-10c6cddd928b24ac6030a172c6c7b46efb32aedc.zip
git-10c6cddd928b24ac6030a172c6c7b46efb32aedc.tar.gz
git-10c6cddd928b24ac6030a172c6c7b46efb32aedc.tar.bz2
dashed externals: kill children on exit
Several git commands are so-called dashed externals, that is commands executed as a child process of the git wrapper command. If the git wrapper is killed by a signal, the child process will continue to run. This is different from internal commands, which always die with the git wrapper command. Enable the recently introduced cleanup mechanism for child processes in order to make dashed externals act more in line with internal commands. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'run-command.c')
-rw-r--r--run-command.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/run-command.c b/run-command.c
index 0204aaf..1db8abf 100644
--- a/run-command.c
+++ b/run-command.c
@@ -497,6 +497,7 @@ static void prepare_run_command_v_opt(struct child_process *cmd,
cmd->stdout_to_stderr = opt & RUN_COMMAND_STDOUT_TO_STDERR ? 1 : 0;
cmd->silent_exec_failure = opt & RUN_SILENT_EXEC_FAILURE ? 1 : 0;
cmd->use_shell = opt & RUN_USING_SHELL ? 1 : 0;
+ cmd->clean_on_exit = opt & RUN_CLEAN_ON_EXIT ? 1 : 0;
}
int run_command_v_opt(const char **argv, int opt)