Bug #193
fsync() should not be called when closing read-only files
| Status: | Closed | Start date: | October 06, 2012 | |
|---|---|---|---|---|
| Priority: | Minor | Due date: | ||
| Assignee: | % 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
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.
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 7 months ago
- % Done changed from 0 to 100
- Status changed from New to Closed