From 9c93249412076dcf52732561b0f6150c3e8000d8 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 18 Jan 2009 18:29:30 +0100 Subject: daemon: pass "detach" flag to daemonize() This way, we don't have to pass the full "Options" object to daemonize(). --- src/daemon.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/daemon.c') diff --git a/src/daemon.c b/src/daemon.c index 671e44a0..02365597 100644 --- a/src/daemon.c +++ b/src/daemon.c @@ -18,7 +18,8 @@ #include "daemon.h" -#include +#include + #include #include #include @@ -133,7 +134,7 @@ daemonize_set_user(void) } void -daemonize(Options *options) +daemonize(bool detach) { #ifndef WIN32 FILE *fp = NULL; @@ -149,7 +150,7 @@ daemonize(Options *options) } } - if (options->daemon) { + if (detach) { int pid; fflush(NULL); -- cgit v1.2.3