Subject: Re: POSIX named semaphores naming restrictions in sem_open()
To: John F. Woods <jfw@jfwhome.funhouse.com>
From: Ian Zagorskih <ianzag@megasignal.com>
List: tech-kern
Date: 09/10/2004 12:43:00
On Friday 10 September 2004 00:04, John F. Woods wrote:
> > According to POSIX specification semaphore name is not required to be
> > started with slash character:
> >
> > "If name does not begin with the slash character, the effect is
> > implementation-defined."
>
> Thus, POSIX indicates that if you want to guarantee the behavior, you
> must use one (and only one) slash character at the start of the name.
> Anything else is "implementation defined", and assuming that the
> documentation indicates that lacking a leading slash leads to failure, the
> implementation meets the requirement.
POSIX documentation indicates that lacking a leading slash character may lead
to failure but does not require it. Of course if i got POSIX docs right.
Well, all what i'm wondering about is why NetBSD realization *explicitly*
requires leading slash? As if it is really important for realization. Though
according to NetBSD code it doesn't depend on slash character at all in any
name position.
Let's take for example some application that doesn't name semaphores this way.
It will be obviously "broken" on NetBSD while technically it is POSIX
compatible and could be fully usable in NetBSD environment.
Isn't this naming scheme requirement is too stern? Why not to forward
portability issues to application developer when it's possibly and doesn't
require lot of work?
// wbr