mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-27 05:10:36 +00:00
When saving file do fflush/fsync, so that its content isn't lost if machine
is forcefully powered down shortly after that.
This commit is contained in:
parent
34bb5fd295
commit
8978796870
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=75988
14
editors/led/files/patch-src::file.c
Normal file
14
editors/led/files/patch-src::file.c
Normal file
@ -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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user