Boost C++ Libraries: Ticket #3582: boost::interprocess::file_lock closes when file is opened then closed. https://svn.boost.org/trac10/ticket/3582 <p> An exclusive file lock is lost if the same file is opened and closed else where in the code. </p> <p> The attached example was complied like this: </p> <blockquote> <p> g++ -o boost_file_lock_test boost_file_lock_test.cpp -I&lt;path/top/boost-1_39&gt;/include/boost-1_39/ </p> </blockquote> <p> Running two instances with in 30 seconds demonstrates the bug. Both instances print 'Acquired lock' when one should print 'Could not acquire lock' and exit. </p> <p> This affects, at the very least, Ubuntu 9.04 Linux but most likely other Linux systems and possibly other platforms. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3582 Trac 1.4.3 joseph@… Fri, 30 Oct 2009 01:03:23 GMT attachment set https://svn.boost.org/trac10/ticket/3582 https://svn.boost.org/trac10/ticket/3582 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_file_lock_test.cpp</span> </li> </ul> <p> test case </p> Ticket joseph@… Fri, 30 Oct 2009 01:07:03 GMT <link>https://svn.boost.org/trac10/ticket/3582#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3582#comment:1</guid> <description> <p> If this is expected behavior that it should probably be noted here <a href="http://www.boost.org/doc/libs/1_38_0/doc/html/interprocess/synchronization_mechanisms.html#interprocess.synchronization_mechanisms.file_lock.file_lock_not_thread_safe Caution: Synchronization limitations">http://www.boost.org/doc/libs/1_38_0/doc/html/interprocess/synchronization_mechanisms.html#interprocess.synchronization_mechanisms.file_lock.file_lock_not_thread_safe Caution: Synchronization limitations</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Ion Gaztañaga</dc:creator> <pubDate>Thu, 26 Aug 2010 10:15:42 GMT</pubDate> <title>status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/3582#comment:2 https://svn.boost.org/trac10/ticket/3582#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.41.0</span> → <span class="trac-field-new">Boost-1.45.0</span> </li> </ul> <p> Expected behwviour noted in documentation for Boost 1.45 in release branch </p> Ticket