Subject: Re: POSIX named semaphores naming restrictions in sem_open()
To: Ian Zagorskih <email@example.com>
From: Arto Huusko <firstname.lastname@example.org>
Date: 09/10/2004 17:27:44
On Fri, 10 Sep 2004, Ian Zagorskih wrote:
> On Friday 10 September 2004 12:59, Thor Lancelot Simon wrote:
> > On Fri, Sep 10, 2004 at 12:43:00PM +0700, Ian Zagorskih wrote:
> > Your two claims about the standard are inconsistent. First you (correctly)
> > note that semaphore names without a leading slash yield "implementation
> > defined" behaviour under the POSIX standard. Then you claim that an
> > application that relies on the behaviour of a *particular implementation*
> > "is POSIX compatible".
> Well, there are at least two points of view:
> 1. If it's not explicitly allowed it's prohibited.
> 2. If it's not explicitly prohibited it's allowed.
> Making my statements i was based on the second view (though usually i prefer
I think the POSIX standard allows implementation defined behaviour,
not for the benefit of applications, but for the benefit of system
That is, if you want to write a portable application, you need to stick to
the rules POSIX tells you and not use anything it tells depends on the
However, if you want to implement a POSIX conformant system, you are allowed
to add some tricks and variations in these cases where POSIX allows them
(which your system software could make use of, for example).
So, if it were explicitly prohibited, but you had a system that allowed
it, the system would not be POSIX conformant. But if it is allowed with
the provision of being implementation dependant, the implementation
stays POSIX conformant no matter what it does -- but an application
using it does not necessarily stay portable.