summaryrefslogtreecommitdiffstats
path: root/lib/libpthread
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2013-11-18 23:17:52 +0000
committertedu <tedu@openbsd.org>2013-11-18 23:17:52 +0000
commitcd1cb807a469c7ce8c3b3f6b0d803f559f92462d (patch)
tree9c74f0d22303062c316ddf0d2166adf77c67bcf0 /lib/libpthread
parentinterprocess semaphores ala sem_open. mostly following in the pattern (diff)
downloadwireguard-openbsd-cd1cb807a469c7ce8c3b3f6b0d803f559f92462d.tar.xz
wireguard-openbsd-cd1cb807a469c7ce8c3b3f6b0d803f559f92462d.zip
boilerplate documentation
Diffstat (limited to 'lib/libpthread')
-rw-r--r--lib/libpthread/man/sem_open.318
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/libpthread/man/sem_open.3 b/lib/libpthread/man/sem_open.3
index 22fdeeab5af..075f0aae121 100644
--- a/lib/libpthread/man/sem_open.3
+++ b/lib/libpthread/man/sem_open.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: sem_open.3,v 1.5 2013/06/05 03:44:50 tedu Exp $
+.\" $OpenBSD: sem_open.3,v 1.6 2013/11/18 23:17:52 tedu Exp $
.\"
.\" Copyright (C) 2000 Jason Evans <jasone@FreeBSD.org>.
.\" All rights reserved.
@@ -28,7 +28,7 @@
.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $FreeBSD: src/lib/libc_r/man/sem_open.3,v 1.7 2001/10/01 16:09:09 ru Exp $
-.Dd $Mdocdate: June 5 2013 $
+.Dd $Mdocdate: November 18 2013 $
.Dt SEM_OPEN 3
.Os
.Sh NAME
@@ -46,11 +46,13 @@
.Fn sem_unlink "const char *name"
.Sh DESCRIPTION
The
-.Fn sem_open ,
-.Fn sem_close ,
-and
+.Fn sem_open
+function opens and returns a named semaphore.
+The .Fn sem_close
+function closes a previously opened named semaphore without removing it.
+The
.Fn sem_unlink
-functions are not supported by this implementation.
+function removes the named semaphore from the system without closing it.
.Sh RETURN VALUES
.Fn sem_open
returns SEM_FAILED and sets
@@ -67,8 +69,10 @@ to indicate an error.
.Fn sem_close ,
and
.Fn sem_unlink
-will fail:
+may fail:
.Bl -tag -width Er
+.It Bq Er EPERM
+An attempt was made to open a shared semaphore owned by another user.
.It Bq Er ENOSYS
Function not supported by this implementation.
.El