diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-02-22 12:47:21 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-02-22 12:47:21 -0500 |
commit | 613073e449c22ad3583e406e48cf5ada395489f0 (patch) | |
tree | 5bedb9b84e8f374393abcfb09df3a5a91514effb | |
parent | 19e5b4c2f269c8842646213c8d78562553a7bfc8 (diff) | |
parent | 5dbaf9dbd545d7c9ecc18224883a74a9dc60ecf4 (diff) | |
download | tor-613073e449c22ad3583e406e48cf5ada395489f0.tar.gz tor-613073e449c22ad3583e406e48cf5ada395489f0.zip |
Merge remote branch 'sebastian/bug2504' into maint-0.2.2
-rw-r--r-- | changes/bug2504 | 5 | ||||
-rw-r--r-- | src/common/compat.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/changes/bug2504 b/changes/bug2504 new file mode 100644 index 0000000000..791600e593 --- /dev/null +++ b/changes/bug2504 @@ -0,0 +1,5 @@ + o Minor bugfixes: + - Fix a bug with our locking implementation on windows that couldn't + correctly detect when a file was already locked. Fixes bug 2504, + bugfix on 0.2.1.6-alpha. + diff --git a/src/common/compat.c b/src/common/compat.c index 5dfde3dc03..d29cacf372 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -699,7 +699,7 @@ tor_lockfile_lock(const char *filename, int blocking, int *locked_out) #ifdef WIN32 _lseek(fd, 0, SEEK_SET); if (_locking(fd, blocking ? _LK_LOCK : _LK_NBLCK, 1) < 0) { - if (errno != EACCESS && errno != EDEADLOCK) + if (errno != EACCES && errno != EDEADLOCK) log_warn(LD_FS,"Couldn't lock \"%s\": %s", filename, strerror(errno)); else *locked_out = 1; |