freebsd-ports/editors/led/files/patch-src::file.c
Maxim Sobolev 8978796870 When saving file do fflush/fsync, so that its content isn't lost if machine
is forcefully powered down shortly after that.
2003-02-20 21:38:05 +00:00

14 lines
201 B
C

$FreeBSD$
--- src/file.c 2002/07/15 11:40:21 1.1
+++ src/file.c 2002/07/15 11:42:31
@@ -192,6 +192,8 @@
putc('\r', fp);
putc('\n', fp);
}
+ fflush(fp);
+ fsync(fileno(fp));
return 0;
}