]> Zhao Yanbai Git Server - minix.git/commitdiff
Added sync() after logfile i/o to reduce risk of losing log entries after
authorBen Gras <ben@minix3.org>
Mon, 11 Jul 2005 13:19:29 +0000 (13:19 +0000)
committerBen Gras <ben@minix3.org>
Mon, 11 Jul 2005 13:19:29 +0000 (13:19 +0000)
e.g. crashes.

commands/simple/usyslogd.c

index 1cca54599508b0dd0e11e3248594835d66f772b3..0fd3a33c75f1a2c07b9550c695dbb2742e498ffa 100644 (file)
@@ -98,6 +98,7 @@ main(int argc, char *argv[])
                        copy(klog_fd, logfp);
                }
                fflush(logfp);
+               sync();
        }
 
        return 0;