summaryrefslogtreecommitdiff
path: root/net/siproxd/files/patch-src__siproxd.c
blob: 4c07b92b96312628bc991ebf0d4b23dbe53bbef2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- src/siproxd.c.orig	Sun Jun 18 18:28:20 2006
+++ src/siproxd.c	Wed Jun 21 09:06:10 2006
@@ -177,11 +177,16 @@
 /*
  * Init stuff
  */
-   INFO(PACKAGE"-"VERSION"-"BUILDSTR" "UNAME" starting up");
-
    /* read the config file */
    if (read_config(configfile, config_search) == STS_FAILURE) exit(1);
 
+   /* Don't log to stderr if daemonizing is intended. */
+   if (configuration.daemonize) {
+      log_set_stderr(0);
+   }
+
+   INFO(PACKAGE"-"VERSION"-"BUILDSTR" "UNAME" starting up");
+
    /* if a debug level > 0 has been given on the commandline use its
       value and not what is in the config file */
    if (cmdline_debuglevel != 0) {
@@ -212,7 +217,6 @@
       setsid();
       if (fork()!=0) exit(0);
 
-      log_set_stderr(0);
       INFO("daemonized, pid=%i", getpid());
    }