diff options
author | sobomax <sobomax@FreeBSD.org> | 2003-02-21 05:38:05 +0800 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2003-02-21 05:38:05 +0800 |
commit | e36e68d6e575297de6bd2044fc8c2a8a826482bb (patch) | |
tree | d19973618a4ec4125c4f905f6e72a45ae2b32b75 /editors | |
parent | ad036d7aac1634ab073efe200c896aa9fb7cf8c4 (diff) | |
download | freebsd-ports-gnome-e36e68d6e575297de6bd2044fc8c2a8a826482bb.tar.gz freebsd-ports-gnome-e36e68d6e575297de6bd2044fc8c2a8a826482bb.tar.zst freebsd-ports-gnome-e36e68d6e575297de6bd2044fc8c2a8a826482bb.zip |
When saving file do fflush/fsync, so that its content isn't lost if machine
is forcefully powered down shortly after that.
Diffstat (limited to 'editors')
-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; + } |