fsync() should not be called when closing read-only files
|Status:||Closed||Start date:||October 06, 2012|
|Assignee:||John Lindgren||% Done:||
Under Linux, fsync() returns an error when the file is on a read-only medium such as a CD-ROM. We should prevent this error by not calling fsync() when we have opened a file in read-only mode.
unix-io: Use POSIX 2008's O_CLOEXEC instead of a separate fcntl(), fixing a race condition. Don't force fsync() when closing a file. Closes: #193.