Opened 8 years ago

Closed 7 years ago

#4039 closed Bugs (fixed)

interprocess named_mutex does not survive hibernate

Reported by: Jan Stetka <jan.stetka@…> Owned by: Ion Gaztañaga
Milestone: Boost 1.45.0 Component: interprocess
Version: Boost 1.40.0 Severity: Problem
Keywords: Cc:


The named mutex is created before the hibernate, then opened after the hibernate, when I was debugging, the debugger would go back to another thread when opening the mutex.

windows xp visual c++ 2003 standard

Attachments (1)

interprocess test.cpp (671 bytes) - added by jan.stetka@… 8 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 8 years ago by Ion Gaztañaga

Could you specify a bit more the error? The mutex can't be opened after the hibernation? The mutex disappears?

comment:2 Changed 8 years ago by Jan Stetka <jan.stetka@…>

I've put try...catch around the mutex too as it may be throwing an exception and that's why it was going back to the other thread, although I didn't look in the debug output. Will test it in a standalone program tonight.

comment:3 Changed 8 years ago by anonymous

#define BOOST_DATE_TIME_NO_LIB #include "boost\interprocess\sync\named_mutex.hpp" #include <string> #include <iostream>

using namespace boost::interprocess; using namespace std;

int main(int argc, char argv[]) {

try {

named_mutex nm(create_only,"testmtx");


catch(interprocess_exception &ex){

cout<< ex.what() <<endl;


string s; cin>> s; pause to allow hibernation try{ named_mutex nm(open_only,"testmtx"); }

catch(interprocess_exception &ex){

cout<< ex.what() <<endl; The system cannot find the file specified.


return 0;


Changed 8 years ago by jan.stetka@…

Attachment: interprocess test.cpp added

comment:4 Changed 7 years ago by Ion Gaztañaga

Milestone: Boost 1.43.0Boost-1.45.0
Resolution: fixed
Status: newclosed

Fixed for Boost 1.45 in release branch

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ion Gaztañaga.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.