Boost Users :
Subject: [Boost-users] [interprocess] Mutex Query
From: Rick Way (rick.way_at_[hidden])
Date: 2009-05-20 09:15:10
I want to make sure that when my program exits ungracefully (CTRL-C, seg
fault, etc) it releases a Boost.Interprocess named_upgradable_mutex, if it's
holding it. I've created a signal handler to catch these ungraceful exits.
Is there any way to tell if my process currently holds an exclusive or
sharable lock on the mutex?
I've tried blindly calling mutex.unlock() and mutex.unlock_sharable() but
that seems to permanently lock the mutex when the shareable lock is set.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net