call openlog on startup
authorJohn Crispin <blogic@openwrt.org>
Wed, 15 Apr 2015 23:54:54 +0000 (01:54 +0200)
committerJohn Crispin <blogic@openwrt.org>
Thu, 18 Jun 2015 17:01:17 +0000 (19:01 +0200)
Signed-off-by: John Crispin <blogic@openwrt.org>
ubusd.c

diff --git a/ubusd.c b/ubusd.c
index 89031053a2386700d1c9bf6f4eb36e8aa1d6b60f..c9cf8b6999e74879c99cde925a7ae6215ac1250a 100644 (file)
--- a/ubusd.c
+++ b/ubusd.c
@@ -17,6 +17,7 @@
 #ifdef FreeBSD
 #include <sys/param.h>
 #endif
+#include <syslog.h>
 #include <signal.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -363,6 +364,7 @@ int main(int argc, char **argv)
 
        signal(SIGPIPE, SIG_IGN);
 
+       openlog("ubusd", LOG_PID, LOG_DAEMON);
        uloop_init();
 
        while ((ch = getopt(argc, argv, "s:")) != -1) {