]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
pthread_mutexattr_setrobust.3: EXAMPLE: show example run of program
authorMichael Kerrisk <mtk.manpages@gmail.com>
Tue, 12 Sep 2017 14:58:05 +0000 (16:58 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Wed, 13 Sep 2017 13:45:09 +0000 (15:45 +0200)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man3/pthread_mutexattr_setrobust.3

index ff0ec5f01737037d5d244fa409f7b44b75e9fa58..98d372fb8a1f82927b742fbb0acd7a2679140466 100644 (file)
@@ -184,6 +184,20 @@ The main thread subsequently acquires the mutex
 successfully and gets the error
 .BR EOWNERDEAD ,
 after which it makes the mutex consistent.
+.PP
+The following shell session shows what we see when running this program:
+.PP
+.in +4n
+.EX
+$ \fB./a.out\fP
+[original owner] Setting lock...
+[original owner] Locked. Now exiting without unlocking.
+[main thread] Attempting to lock the robust mutex.
+[main thread] pthread_mutex_lock() returned EOWNERDEAD
+[main thread] Now make the mutex consistent
+[main thread] Mutex is now consistent; unlocking
+.EE
+.in
 .SS Program source
 .EX
 #include <stdlib.h>