Ticket #3582 (closed Bugs: fixed)

Opened 8 years ago

Last modified 7 years ago

boost::interprocess::file_lock closes when file is opened then closed.

Reported by: jcoffland Owned by: igaztanaga
Milestone: Boost 1.45.0 Component: interprocess
Version: Boost 1.39.0 Severity: Problem
Keywords: file_lock open close Cc:


An exclusive file lock is lost if the same file is opened and closed else where in the code.

The attached example was complied like this:

g++ -o boost_file_lock_test boost_file_lock_test.cpp -I<path/top/boost-1_39>/include/boost-1_39/

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.

This affects, at the very least, Ubuntu 9.04 Linux but most likely other Linux systems and possibly other platforms.


boost_file_lock_test.cpp (536 bytes) - added by joseph@… 8 years ago.
test case

Change History

Changed 8 years ago by joseph@…

test case

comment:2 Changed 7 years ago by igaztanaga

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from Boost 1.41.0 to Boost-1.45.0

Expected behwviour noted in documentation for Boost 1.45 in release branch


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.