What about the named_semaphore? Is it able to recover if the process dies abnormally? -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Kim Barrett Sent: February-11-10 4:29 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] abandoned named_mutex On Feb 11, 2010, at 5:11 PM, Carla Strembicke wrote:
My question is with regard to named_mutexes that are abandoned by a process that dies abnormally.
Is there any support in the boost mutex to determine if the mutex has been abandoned?
I think not yet, though this has been discussed in the past.
Any other suggestions?
What you want is called a "robust" mutex in the Unix world; search for pthread_mutexattr_setrobust and pthread_mutex_consistent. Reasonably recent versions of Linux have them (kernel support showed up in 2.6.17or18, I forget which). Some other Unix variants also support them (I think they may have been around in Sun variants for quite a while, for example). _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users