diff --git a/log.c b/log.c index 404d43f..81064e7 100644 --- a/log.c +++ b/log.c @@ -328,6 +328,8 @@ logger_main(int fd, struct imsgbuf *ibuf) { log = stderr; + openlog(getprogname(), LOG_NDELAY, LOG_DAEMON); + event_init(); event_set(&imsgev, fd, EV_READ | EV_PERSIST, &handle_dispatch_imsg, ibuf); @@ -337,5 +339,7 @@ logger_main(int fd, struct imsgbuf *ibuf) event_dispatch(); + closelog(); + return 0; }