diff options
author | Maxim Sobolev <sobomax@FreeBSD.org> | 2003-02-20 21:38:05 +0000 |
---|---|---|
committer | Maxim Sobolev <sobomax@FreeBSD.org> | 2003-02-20 21:38:05 +0000 |
commit | 8978796870a717acae1fabe8124466b6054e3db0 (patch) | |
tree | 594cb344e0281a2b19fd4d8713cccbf773088da2 | |
parent | Add qemacs, Quick Emacs, a very small but powerful editor (diff) |
When saving file do fflush/fsync, so that its content isn't lost if machine
is forcefully powered down shortly after that.
Notes
Notes:
svn path=/head/; revision=75988
-rw-r--r-- | editors/led/files/patch-src::file.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/editors/led/files/patch-src::file.c b/editors/led/files/patch-src::file.c new file mode 100644 index 000000000000..1bae33d41233 --- /dev/null +++ b/editors/led/files/patch-src::file.c @@ -0,0 +1,14 @@ + +$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; + } |