|
Boost-Commit : |
From: igaztanaga_at_[hidden]
Date: 2008-06-30 12:56:05
Author: igaztanaga
Date: 2008-06-30 12:56:05 EDT (Mon, 30 Jun 2008)
New Revision: 46922
URL: http://svn.boost.org/trac/boost/changeset/46922
Log:
Fixed bug for unix systems in file locking functions
Text files modified:
trunk/boost/interprocess/detail/os_file_functions.hpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Modified: trunk/boost/interprocess/detail/os_file_functions.hpp
==============================================================================
--- trunk/boost/interprocess/detail/os_file_functions.hpp (original)
+++ trunk/boost/interprocess/detail/os_file_functions.hpp 2008-06-30 12:56:05 EDT (Mon, 30 Jun 2008)
@@ -310,7 +310,7 @@
lock.l_len = 0;
int ret = ::fcntl(hnd, F_SETLK, &lock);
if(ret == -1){
- return (errno != EAGAIN && errno != EACCES) ?
+ return (errno == EAGAIN || errno == EACCES) ?
acquired = false, true : false;
}
return (acquired = true);
@@ -345,7 +345,7 @@
lock.l_len = 0;
int ret = ::fcntl(hnd, F_SETLK, &lock);
if(ret == -1){
- return (errno != EAGAIN && errno != EACCES) ?
+ return (errno == EAGAIN || errno == EACCES) ?
acquired = false, true : false;
}
return (acquired = true);
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk