Opened 13 years ago

Closed 12 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:

Description

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@… 13 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by Ion Gaztañaga, 13 years ago

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

comment:2 by Jan Stetka <jan.stetka@…>, 13 years ago

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 by anonymous, 13 years ago

#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;

}

by jan.stetka@…, 13 years ago

Attachment: interprocess test.cpp added

comment:4 by Ion Gaztañaga, 12 years ago

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

Fixed for Boost 1.45 in release branch

Note: See TracTickets for help on using tickets.