]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Revert "Use the FILE_SHARE_DELETE flag for CreateFile on a mapping"
authorNick Mathewson <nickm@torproject.org>
Wed, 12 Jun 2013 14:45:48 +0000 (10:45 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 12 Jun 2013 14:45:48 +0000 (10:45 -0400)
This reverts commit 884a0e269c382f9e927d8c8b1ef4ef9d2d48379d.

I'm reverting this because it doesn't actually make the problem go
away.  It appears that instead we need to do unmap-then-replace.

changes/bug2077_share_delete [deleted file]
src/common/compat.c

diff --git a/changes/bug2077_share_delete b/changes/bug2077_share_delete
deleted file mode 100644 (file)
index 71e9160..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-  o Major bugfixes (windows):
-    - Open files to be mapped with FILE_SHARE_DELETE so that we can
-      replace them before closing the mapping. This is a likely cause of
-      warnings and crashes when replacing the microdescriptor cache
-      file. Diagnosed based on comments by "doorss" and by Robert
-      Ransom. Possible fix for bug 2077; bugfix on 0.2.2.6-alpha.
-
index cb1dd787a0c3ab6eb62c2efd612107cb28d59f3b..c97a4545c9f669c96b16ea6c68451d0cb451f11a 100644 (file)
@@ -248,7 +248,7 @@ tor_mmap_file(const char *filename)
   strlcpy(tfilename,filename,MAX_PATH);
 #endif
   file_handle = CreateFile(tfilename,
-                           GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_DELETE,
+                           GENERIC_READ, FILE_SHARE_READ,
                            NULL,
                            OPEN_EXISTING,
                            FILE_ATTRIBUTE_NORMAL,