X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=common%2Fcommon.c;h=43b2bf22145c2b014b4f4c2bb4988c0733e37fe6;hb=e327d3786ba0371eaaff8e6ba0fe3fc39f095ae2;hp=3d2862fc23be66bb85ff92d1c7951008efa3ccb1;hpb=f798d6403cab4926b31d8e5a4b72f406d6f46651;p=apps%2Fpfixtools.git diff --git a/common/common.c b/common/common.c index 3d2862f..43b2bf2 100644 --- a/common/common.c +++ b/common/common.c @@ -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();