diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2016-09-12 05:53:36 +0100 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2016-09-12 05:53:36 +0100 |
| commit | fa1aa3502a2f9554cef6c98f62514abb804201b3 (patch) | |
| tree | 851a08b00a7acff6e246618c4037f1107a12421f | |
| parent | f157f403de9ef099a1cfeaa2b2d95b4347b833c8 (diff) | |
| download | man-pages-fa1aa3502a2f9554cef6c98f62514abb804201b3.tar.gz | |
close.2: Clarify discussion noting that close() does not flush buffer cache
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| -rw-r--r-- | man2/close.2 | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/man2/close.2 b/man2/close.2 index c9d61aa915..56577b140d 100644 --- a/man2/close.2 +++ b/man2/close.2 @@ -106,11 +106,10 @@ should not be retried after an since this may cause a reused file descriptor from another thread to be closed. .PP A successful close does not guarantee that the data has been successfully -saved to disk, as the kernel defers writes. -It is not common for a filesystem -to flush the buffers when the stream is closed. +saved to disk, as the kernel uses the buffer cache to defer writes. +Typically, filesystems do not flush buffers when a file is closed. If you need to be sure that -the data is physically stored, use +the data is physically stored on the underlying disk, use .BR fsync (2). (It will depend on the disk hardware at this point.) .PP |
