From 43bbb3c41056e085aaff88f93c75622d1a70ecd4 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Sun, 21 Jun 2009 20:57:03 +0000 Subject: Check return status of fsync (Georg Sauthoff). --- src/platforms/posix/posixFile.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/platforms/posix/posixFile.cpp') diff --git a/src/platforms/posix/posixFile.cpp b/src/platforms/posix/posixFile.cpp index b371fe73..d04ebc25 100644 --- a/src/platforms/posix/posixFile.cpp +++ b/src/platforms/posix/posixFile.cpp @@ -126,7 +126,8 @@ void posixFileWriterOutputStream::write(const value_type* const data, const size void posixFileWriterOutputStream::flush() { - ::fsync(m_fd); + if (::fsync(m_fd) == -1) + posixFileSystemFactory::reportError(m_path, errno); } -- cgit v1.2.3