pthread_mutexattr_setrobust.3: On Linux execve(2) also causes EOWNERDIED notification

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2017-09-13 14:34:58 +02:00
parent 143e516fbd
commit 5ede40bbc8
1 changed files with 11 additions and 2 deletions

View File

@ -88,8 +88,6 @@ on the mutex will block indefinitely.
If a mutex is initialized with the
.BR PTHREAD_MUTEX_ROBUST ,
attribute and its owner dies without unlocking it,
.\" FIXME Yubin claims execve(2) without first unlocking yields
.\" the same behavior. To be verified...
any future attempts to call
.BR pthread_mutex_lock (3)
on this mutex will succeed and return
@ -152,6 +150,17 @@ were added to glibc in version 2.12.
.SH CONFORMING TO
POSIX.1-2008.
.SH NOTES
In the Linux implementation,
when using process-shared robust mutexes, a waiting thread also receives the
.B EOWNERDEAD
notification if the owner of a mutex performs an
.BR execve (2)
without first unlocking the mutex.
POSIX.1 does not specify this detail,
but the same behavior also occurs in at least some
.\" E.g., Solaris, according to its manual page
other implementations.
.PP
Before the addition of
.BR pthread_mutexattr_getrobust ()
and