Can I do dead-owner-process recovery with POSIX mutexes?
el Gringo wrote: > > Hi. > > I am trying to create a mutxe on a program that has to work on NT 4.0 and AIX. > For NT, I use CreateMutexes…etc, and in this case, if the process owning the > mutex crashes, the system releases the mutex and returns WAIT_ABONDONED to the > thread that is waiting for the mutex to be released. And if the mutex is > opened several times by the same thread, the call succeses and the mutex count > is incremeneted. > > What I don’t know is if the pthread mutexes do the same thing when a thread or > process owning the mutexe crashes…or when the Pthread_mutex_lock() is called > several times by the same one. Could someone provide me with a doc or web site > so I can find those answers ? Thanks. Riad Riad, Ah… You got a *big* set of problems to deal with. The simple answer is that POSIX mutexes don’t do that, but that you can create that kind of behavior if you want to. The problems I refer to are those surrounding what you do when the owner process crashes.