Opened 14 years ago
Closed 14 years ago
#1010 closed Defect (fixed)
[PATCH] boinc_rename very not atomic on Windows
Reported by: | MattArsenault | Owned by: | davea |
---|---|---|---|
Priority: | Minor | Milestone: | Undetermined |
Component: | BOINC - API | Version: | 6.10.58 |
Keywords: | rename, atomic, move | Cc: |
Description
boinc_rename is very not atomic on Windows. The posix version uses the standard and atomic rename() function, but the Win32 API (until Vista) doesn't have a way to get atomic file updates. boinc_rename on Win32 deletes the original file before moving the old one, increasing the chance of problems if the system is interrupted in between. You can get closer to atomic rename by using MoveFileEx? with the MOVEFILE_REPLACE_EXISTING and MOVEFILE_WRITE_THROUGH flags.
Attachments (1)
Change History (3)
Changed 14 years ago by
Attachment: | UseMoveFileEx.diff added |
---|
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [22364]) - client (Win): use MoveFileEx?() to rename file.
More atomic than delete/rename. fixes #1010
This patch is for the svn trunk.