Re: [PATCH v2 06/17] index-helper: add --detach
On Sat, Mar 19, 2016 at 8:04 AM, David Turner <dturner@twopensource.com> wrote:
> @@ -237,6 +239,7 @@ int main(int argc, char **argv)
> N_("exit if not used after some seconds")),
> OPT_BOOL(0, "strict", &to_verify,
> "verify shared memory after creating"),> + OPT_BOOL(0, "detach", &detach, "detach the process"),
Show 7 quoted lines
> OPT_END()
> };
>
> @@ -258,6 +261,10 @@ int main(int argc, char **argv)
> fd = setup_pipe(pipe_path.buf);
> if (fd < 0)
> die_errno("Could not set up index-helper.pipe");> +
> + if (detach && daemonize(&daemonized))
> + die_errno("unable to detach");Show 7 quoted lines
> +
> loop(fd, idle_in_seconds);
> return 0;
> }
> --
> 2.4.2.767.g62658d5-twtrsrc
>
--
Duy