From: Ben Gras Date: Mon, 11 Jul 2005 13:19:29 +0000 (+0000) Subject: Added sync() after logfile i/o to reduce risk of losing log entries after X-Git-Tag: v3.1.0~627 X-Git-Url: http://zhaoyanbai.com/repos/doc/tz-art.htm?a=commitdiff_plain;h=5c13385e40896dcb0c00dc9b591b76f3f4db20e0;p=minix.git Added sync() after logfile i/o to reduce risk of losing log entries after e.g. crashes. --- 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;