Make file writes seem atomic #31

Closed
opened 2016-03-01 16:25:15 -05:00 by anna · 0 comments
Owner

Right now we write to the result file directly, so a poorly timed ^C could cause a partial, possibly corrupt, file to be written. Let's approach this a different way:

  • OPEN_READ opens the file directly for reading.
  • OPEN_WRITE opens a temporary file for writing. Calling close() on the file structure will then trigger a rename, replacing the old file in the filesystem.
Right now we write to the result file directly, so a poorly timed ^C could cause a partial, possibly corrupt, file to be written. Let's approach this a different way: - OPEN_READ opens the file directly for reading. - OPEN_WRITE opens a temporary file for writing. Calling close() on the file structure will then trigger a rename, replacing the old file in the filesystem.
anna self-assigned this 2016-03-30 14:22:40 -04:00
anna added this to the 6.4.16 milestone 2016-04-13 20:59:16 -04:00
anna added this to the 6.4.15 milestone 2016-04-26 17:35:10 -04:00
anna referenced this issue from a commit 2016-06-24 15:14:30 -04:00
ee4f0d4c8905af5fb94f50c372e68b8e246107ae
anna closed this issue 2016-06-24 15:14:37 -04:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: anna/ocarina#31
No description provided.