aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-02-08 14:02:43 -0500
committerNick Mathewson <nickm@torproject.org>2011-02-08 14:02:43 -0500
commitf25fc6e6505c08309850108486375830b39d00b9 (patch)
tree5c92f25d09d189b62d08a08ba2bdfbbeb04c0988 /src/common
parent32796bbe823909b2b828e2228af559d889070d85 (diff)
parent9c7e2cf010856aabfbca042870ec1d5718c30ea4 (diff)
downloadtor-f25fc6e6505c08309850108486375830b39d00b9.tar
tor-f25fc6e6505c08309850108486375830b39d00b9.tar.gz
Merge remote branch 'origin/maint-0.2.2'
Diffstat (limited to 'src/common')
-rw-r--r--src/common/compat.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index 2737005cb..1b103e96d 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -705,7 +705,10 @@ struct tor_lockfile_t {
*
* (Implementation note: because we need to fall back to fcntl on some
* platforms, these locks are per-process, not per-thread. If you want
- * to do in-process locking, use tor_mutex_t like a normal person.)
+ * to do in-process locking, use tor_mutex_t like a normal person.
+ * On Windows, when <b>blocking</b> is true, the maximum time that
+ * is actually waited is 10 seconds, after which NULL is returned
+ * and <b>locked_out</b> is set to 1.)
*/
tor_lockfile_t *
tor_lockfile_lock(const char *filename, int blocking, int *locked_out)
@@ -725,7 +728,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 != EDEADLOCK)
+ if (errno != EACCESS && errno != EDEADLOCK)
log_warn(LD_FS,"Couldn't lock \"%s\": %s", filename, strerror(errno));
else
*locked_out = 1;