From: Clemens Buchacher Date: Thu, 05 Jan 2012 16:06:15 GMT Subject: Re: [PATCH 1/2] daemon: add tests Message-ID: <20120105160612.GA27251@ecki.lan> In-Reply-To: <20120105025559.GB7326@sigill.intra.peff.net> On Wed, Jan 04, 2012 at 09:55:59PM -0500, Jeff King wrote: > > It so happens that I have just the patch you need. I've been meaning to > go over it again and submit it: > > run-command: optionally kill children on exit > https://github.com/peff/git/commit/5523d7ebf2a0386c9c61d7bfbc21375041df4989 Thanks, looks great. But if I add this on top (to enable this for "git daemon"), then t0001 kills my entire X session. Not sure yet what's going. diff --git a/run-command.c b/run-command.c index aeb9c6e..53218df 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 = 1; } int run_command_v_opt(const char **argv, int opt)