Modify

Opened 7 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: igaztanaga
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@… 7 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 7 years ago by igaztanaga

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

comment:2 Changed 7 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 7 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 7 years ago by jan.stetka@…

comment:4 Changed 7 years ago by igaztanaga

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

Fixed for Boost 1.45 in release branch

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain igaztanaga.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.