From 5c13385e40896dcb0c00dc9b591b76f3f4db20e0 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Mon, 11 Jul 2005 13:19:29 +0000 Subject: [PATCH] Added sync() after logfile i/o to reduce risk of losing log entries after e.g. crashes. --- commands/simple/usyslogd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/commands/simple/usyslogd.c b/commands/simple/usyslogd.c index 1cca54599..0fd3a33c7 100644 --- a/commands/simple/usyslogd.c +++ b/commands/simple/usyslogd.c @@ -98,6 +98,7 @@ main(int argc, char *argv[]) copy(klog_fd, logfp); } fflush(logfp); + sync(); } return 0;