summaryrefslogtreecommitdiffstats
path: root/syslog.c
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-04-18 21:27:58 +0200
committerJohn Crispin <blogic@openwrt.org>2013-04-23 18:54:03 +0200
commit32f1c6e4679b6e0737616f3e58528531e826a3ce (patch)
tree48c57bd9cf880799db14a75a9f5e8d603287bc08 /syslog.c
parent9961e88dd853a30503298378679d2cedc497410e (diff)
downloadunitd-32f1c6e4679b6e0737616f3e58528531e826a3ce.tar
unitd-32f1c6e4679b6e0737616f3e58528531e826a3ce.zip
fix behaviour during sysupgrade
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'syslog.c')
-rw-r--r--syslog.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/syslog.c b/syslog.c
index 416740b..fa4a9b3 100644
--- a/syslog.c
+++ b/syslog.c
@@ -276,3 +276,11 @@ void log_init(void)
klog_open();
openlog("procd", LOG_PID, LOG_DAEMON);
}
+
+void log_shutdown(void)
+{
+ ustream_free(&slog.stream);
+ ustream_free(&klog.stream);
+ close(slog.fd.fd);
+ close(klog.fd.fd);
+}