Move some code.
[apps/pfixtools.git] / common / common.c
index 3d2862f..43b2bf2 100644 (file)
@@ -46,6 +46,7 @@ sig_atomic_t sighup  = false;
 
 bool daemon_process  = true;
 int  log_level       = LOG_INFO;
+bool log_syslog      = false;
 
 static FILE *pidfile = NULL;
 
@@ -67,7 +68,7 @@ void common_sighandler(int sig)
     }
 }
 
-static int setnonblock(int sock)
+int setnonblock(int sock)
 {
     int res = fcntl(sock, F_GETFL);
 
@@ -296,7 +297,7 @@ extern exitcall_t __madexit[];
 
 static void common_shutdown(void)
 {
-    if (daemon_process) {
+    if (daemon_process && log_syslog) {
         info("stopping...");
     }
     pidfile_close();