replace and remove run_command_v_opt_tr2()

The convenience function run_command_v_opt_tr2() is only used by a
single caller.  Use struct child_process and run_command() directly
instead and remove the underused function.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
This commit is contained in:
René Scharfe
2022-10-30 12:52:40 +01:00
committed by Taylor Blau
parent eb5b6b57d0
commit d82dbbd849
3 changed files with 7 additions and 9 deletions

View File

@ -54,10 +54,14 @@ enum ipc_active_state fsmonitor_ipc__get_state(void)
static int spawn_daemon(void)
{
const char *args[] = { "fsmonitor--daemon", "start", NULL };
struct child_process cmd = CHILD_PROCESS_INIT;
return run_command_v_opt_tr2(args, RUN_COMMAND_NO_STDIN | RUN_GIT_CMD,
"fsmonitor");
cmd.git_cmd = 1;
cmd.no_stdin = 1;
cmd.trace2_child_class = "fsmonitor";
strvec_pushl(&cmd.args, "fsmonitor--daemon", "start", NULL);
return run_command(&cmd);
}
int fsmonitor_ipc__send_query(const char *since_token,