Boost logo

Boost Users :

Subject: Re: [Boost-users] abandoned named_mutex
From: Carla Strembicke (Carla.Strembicke_at_[hidden])
Date: 2010-02-12 11:32:56


What about the named_semaphore?
Is it able to recover if the process dies abnormally?

-----Original Message-----
From: boost-users-bounces_at_[hidden] [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Kim Barrett
Sent: February-11-10 4:29 PM
To: boost-users_at_[hidden]
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_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


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