mirror of https://github.com/mkerrisk/man-pages
sem_overview.7: Clarify construction rules for semaphore object names
See also http://groups.google.com/group/comp.os.linux.development.apps/browse_thread/thread/b4a67caa765cb65f Reported-by: Jens Thoms Toerring <jt@toerring.de> Reported-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
db2fff8c01
commit
e2cbd4754e
|
@ -23,7 +23,7 @@
|
||||||
.\" Formatted or processed versions of this manual, if unaccompanied by
|
.\" Formatted or processed versions of this manual, if unaccompanied by
|
||||||
.\" the source, must acknowledge the copyright and authors of this work.
|
.\" the source, must acknowledge the copyright and authors of this work.
|
||||||
.\"
|
.\"
|
||||||
.TH SEM_OVERVIEW 7 2008-06-15 "Linux" "Linux Programmer's Manual"
|
.TH SEM_OVERVIEW 7 2009-02-20 "Linux" "Linux Programmer's Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
sem_overview \- Overview of POSIX semaphores
|
sem_overview \- Overview of POSIX semaphores
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
@ -44,7 +44,20 @@ unnamed semaphores.
|
||||||
.TP
|
.TP
|
||||||
.B Named semaphores
|
.B Named semaphores
|
||||||
A named semaphore is identified by a name of the form
|
A named semaphore is identified by a name of the form
|
||||||
.IR /somename .
|
.IR /somename ;
|
||||||
|
that is, a null-terminated string of up to
|
||||||
|
.BI NAME_MAX +1
|
||||||
|
(i.e., 256) characters consisting of an initial slash,
|
||||||
|
.\" glibc allows the initial slash to be omitted, and makes
|
||||||
|
.\" multiple initial slashes equivalent to a single slash.
|
||||||
|
.\" This differs from the implementation of POSIX message queues.
|
||||||
|
followed by one or more characters, none of which are slashes.
|
||||||
|
.\" glibc allows subdirectory components in the name, in which
|
||||||
|
.\" case the subdirectory tree must exist under /dev/shm, and
|
||||||
|
.\" the fist subdirectory component must exist as the name
|
||||||
|
.\" sem.name, and all of the subdirectory components must allow the
|
||||||
|
.\" required permissions if a user wants to create a semaphore
|
||||||
|
.\" object in a subdirectory.
|
||||||
Two processes can operate on the same named semaphore by passing
|
Two processes can operate on the same named semaphore by passing
|
||||||
the same name to
|
the same name to
|
||||||
.BR sem_open (3).
|
.BR sem_open (3).
|
||||||
|
@ -113,7 +126,7 @@ On Linux, named semaphores are created in a virtual file system,
|
||||||
normally mounted under
|
normally mounted under
|
||||||
.IR /dev/shm ,
|
.IR /dev/shm ,
|
||||||
with names of the form
|
with names of the form
|
||||||
.IR \fBsem.\fPname .
|
.IR \fBsem.\fPsomename .
|
||||||
|
|
||||||
Since Linux 2.6.19, ACLs can be placed on files under this directory,
|
Since Linux 2.6.19, ACLs can be placed on files under this directory,
|
||||||
to control object permissions on a per-user and per-group basis.
|
to control object permissions on a per-user and per-group basis.
|
||||||
|
|
Loading…
Reference in New Issue