Boost logo

Boost Users :

Subject: Re: [Boost-users] abandoned named_mutex
From: Kim Barrett (kab.conundrums_at_[hidden])
Date: 2010-02-11 18:29:01


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