Bug #193

fsync() should not be called when closing read-only files

Added by John Lindgren almost 2 years ago. Updated almost 2 years ago.

Status:Closed Start date:October 06, 2012
Priority:Minor Due date:
Assignee:John Lindgren % Done:

100%

Category:plugins/unix io
Target version:3.3.3
Affects version:

Description

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.

Associated revisions

Revision ac50a643
Added by John Lindgren almost 2 years ago

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.

Revision 6a4bd2e2
Added by John Lindgren over 1 year ago

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.

History

#1 Updated by John Lindgren almost 2 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

Also available in: Atom PDF