sem_overview.7: Fix discussion of length of semaphore names

Because of the "sem." prefix added by glibc to a semaphore
name, the limit on the length of the name (excluding the
terminating null byte) is 251 characters.

Reported-by: Jens Thoms Toerring <jt@toerring.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2009-02-25 12:45:34 +13:00
parent 590d0346d9
commit 13e0f2a9d3
1 changed files with 8 additions and 3 deletions

View File

@ -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 2009-02-20 "Linux" "Linux Programmer's Manual" .TH SEM_OVERVIEW 7 2009-02-25 "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
@ -46,8 +46,8 @@ unnamed 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 that is, a null-terminated string of up to
.BI NAME_MAX +1 .BI NAME_MAX \-4
(i.e., 256) characters consisting of an initial slash, (i.e., 251) characters consisting of an initial slash,
.\" glibc allows the initial slash to be omitted, and makes .\" glibc allows the initial slash to be omitted, and makes
.\" multiple initial slashes equivalent to a single slash. .\" multiple initial slashes equivalent to a single slash.
.\" This differs from the implementation of POSIX message queues. .\" This differs from the implementation of POSIX message queues.
@ -127,6 +127,11 @@ normally mounted under
.IR /dev/shm , .IR /dev/shm ,
with names of the form with names of the form
.IR \fBsem.\fPsomename . .IR \fBsem.\fPsomename .
(This is the reason that semaphore names are limited to
.BI NAME_MAX \-4
rather than
.B NAME_MAX
characters.)
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.