Thread (25 messages) flat view 25 messages, 3 authors, 2016-06-15

Re: [PATCH v2 06/17] index-helper: add --detach

From: Duy Nguyen <hidden>
Date: 2016-06-15 23:09:05

On Sat, Mar 19, 2016 at 8:04 AM, David Turner [off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -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"),
N_() here (my bad)
+               OPT_BOOL(0, "detach", &detach, "detach the process"),
ditto
quoted hunk ↗ jump to hunk
                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");
_() here
+
+       if (detach && daemonize(&daemonized))
+               die_errno("unable to detach");
and here
+
        loop(fd, idle_in_seconds);
        return 0;
 }
--
2.4.2.767.g62658d5-twtrsrc


-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help