From 25e312e1a36e55257a71189bdbe786111622397d Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 12 Jul 2007 16:17:23 +0000 Subject: r13714@catbus: nickm | 2007-07-12 12:08:35 -0400 Backport r10148: open cached-routers with FILE_SHARE_READ on win32. svn:r10807 --- ChangeLog | 2 ++ doc/TODO.012 | 2 +- src/common/compat.c | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index b9a27abeea..9139d1361c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,8 @@ Changes in version 0.1.2.15 - 2007-0?-?? correctly. Previously, we were under-counting by 1. o Minor bugfixes (misc) + - On Windows, we were preventing other processes from reading + cached-routers while Tor was running. (Reported by janbar) - Backport miscellaneous cosmetic bugfixes. diff --git a/doc/TODO.012 b/doc/TODO.012 index 69fbf5eb14..860b26d1e9 100644 --- a/doc/TODO.012 +++ b/doc/TODO.012 @@ -1,5 +1,5 @@ Backport items for 0.1.2: - - r10148: open cached-routers with FILE_SHARE_READ on win32. + o r10148: open cached-routers with FILE_SHARE_READ on win32. o r10240,10242: avoid choosing family of exit as guard. o r10248: handle lack of nul at end of mmaped data. - r10346: Try even harder not to look at the first byte after an mmap. diff --git a/src/common/compat.c b/src/common/compat.c index ce7e00babc..2d38aca80c 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -199,8 +199,8 @@ tor_mmap_file(const char *filename) res->mmap_handle = NULL; res->file_handle = CreateFile(filename, - GENERIC_READ, - 0, NULL, + GENERIC_READ, FILE_SHARE_READ, + NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); -- cgit v1.2.3-54-g00ecf