Check return status of fsync (Georg Sauthoff).

This commit is contained in:
Vincent Richard 2009-06-21 20:57:03 +00:00
parent f688cbb292
commit 43bbb3c410
2 changed files with 3 additions and 1 deletions

View File

@ -19,4 +19,5 @@ Other contributors:
- Benjamin Biron <benbiron@gmail.com>
- Bertrand Benoit <bsquare@bsquare.levillage.org>
- Tim Teulings <rael@edge.ping.de>
- Georg Sauthoff <gsauthof@techfak.uni-bielefeld.de>

View File

@ -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);
}