From 13e0f2a9d3055102c3db1ecda2122c1f96b80e83 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Wed, 25 Feb 2009 12:45:34 +1300 Subject: [PATCH] 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 Signed-off-by: Michael Kerrisk --- man7/sem_overview.7 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/man7/sem_overview.7 b/man7/sem_overview.7 index d2c6c2762..ef354feca 100644 --- a/man7/sem_overview.7 +++ b/man7/sem_overview.7 @@ -23,7 +23,7 @@ .\" Formatted or processed versions of this manual, if unaccompanied by .\" 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 sem_overview \- Overview of POSIX semaphores .SH DESCRIPTION @@ -46,8 +46,8 @@ unnamed semaphores. A named semaphore is identified by a name of the form .IR /somename ; that is, a null-terminated string of up to -.BI NAME_MAX +1 -(i.e., 256) characters consisting of an initial slash, +.BI NAME_MAX \-4 +(i.e., 251) 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. @@ -127,6 +127,11 @@ normally mounted under .IR /dev/shm , with names of the form .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, to control object permissions on a per-user and per-group basis.