diff -r c3a0f1275d71 -r 51d9a15eac98 src/server/daemon/main.c --- a/src/server/daemon/main.c Wed Feb 10 12:19:56 2016 +0100 +++ b/src/server/daemon/main.c Sat Oct 22 11:27:39 2016 +0200 @@ -46,7 +46,8 @@ #include "configmanager.h" -int std_pipe_fds[2]; +static int std_pipe_fds[2]; +static WSBool is_daemon; void test() { time_t t = time(NULL); @@ -55,6 +56,11 @@ printf("%s\n", date.ptr); } + +WSBool main_is_daemon(void) { + return is_daemon; +} + /* * SIGUSR1: reload the configuration files */ @@ -97,15 +103,15 @@ //test(); /* if the -c parameter is specified, we don't create a daemon */ - int d = 1; + is_daemon = 1; for(int i=0;i