mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 14:23:30 +01:00
Windows has EACCES, not EACCESS
Once again spotted by mobmix Also add a changes file for the fix
This commit is contained in:
parent
9b745cdbf9
commit
5dbaf9dbd5
5
changes/bug2504
Normal file
5
changes/bug2504
Normal file
@ -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.
|
||||||
|
|
@ -699,7 +699,7 @@ tor_lockfile_lock(const char *filename, int blocking, int *locked_out)
|
|||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
_lseek(fd, 0, SEEK_SET);
|
_lseek(fd, 0, SEEK_SET);
|
||||||
if (_locking(fd, blocking ? _LK_LOCK : _LK_NBLCK, 1) < 0) {
|
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));
|
log_warn(LD_FS,"Couldn't lock \"%s\": %s", filename, strerror(errno));
|
||||||
else
|
else
|
||||||
*locked_out = 1;
|
*locked_out = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user