Hello, My question is with regard to named_mutexes that are
abandoned by a process that dies abnormally. Essentially I have shared memory( utilizing boost shared
memory libraries ) and am incorporating boost named mutexes to limit access to
one process at a time. There is no concept of a server/client or parent/child
process....the process have equal opportunity. This is Microsoft centric
code that I am required to support cross-platforms( Unix-like). Microsoft’s mutexes have the concept of a mutex
object being abandoned if the thread terminates without releasing. Is there any support in the boost mutex to determine if the
mutex has been abandoned? Option: What I am considering is perhaps before the mutex is locked,
it check a file that has been created with the mutex name and the pid of the
process that has it locked. If the process does not exisit the file the mutex is
unlocked and the file entry is removed and the new process id is entered. I am not sure if there is a chance of a race condition I
would have to scope it out. FYI – I am using 1.41. is there any changes in 1.42 (
i will be checking ). Any other suggestions?
Carla Strembicke
Software Developer
SUBNET Solutions Inc.
www.SUBNET.com
Making Substations More Intelligent
T: 403.270.8885
F: 403.270.9631
#100, 4639 Manhattan Road SE, Calgary, Alberta, Canada; T2G 4B3
Follow SUBNET: Twitter | Facebook | Linkedln
Visit the all new SUBNET website at http://www.SUBNET.com
CONFIDENTIAL INFORMATION NOTICE: The information contained in this e-mail is privileged, confidential and intended solely for the use of the addressee named above. If the reader of this e-mail is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this e-mail is strictly prohibited. If you received this in error, please contact the sender and destroy all copies of this e-mail. Thank you.