daemon: use an argv_array to exec children
authorJeff King <peff@peff.net>
Tue, 28 Mar 2017 19:48:10 +0000 (15:48 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Mar 2017 21:59:50 +0000 (14:59 -0700)
commit6a97da396470cb85e289a4810326fd7f50062b96
tree9583d4c6d7220e867f4dfbd37d42687a386cd5d6
parent07af88913662f1179ba34b92370a6df24263ae5f
daemon: use an argv_array to exec children

Our struct child_process already has its own argv_array.
Let's use that to avoid having to format options into
separate buffers.

Note that we'll need to declare the child process outside of
the run_service_command() helper to do this. But that opens
up a further simplification, which is that the helper can
append to our argument list, saving each caller from
specifying "." manually.

Signed-off-by: Jeff King <peff@peff.net>
daemon.c