Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Dec 2004 09:59:56 -0800
From:      Joe Kelsey <joe@zircon.seattle.wa.us>
To:        kamalp@acm.org
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Fixing Posix semaphores
Message-ID:  <1103047196.30309.254.camel@zircon.zircon.seattle.wa.us>
In-Reply-To: <20041214160855.33007.qmail@web52709.mail.yahoo.com>
References:  <20041214160855.33007.qmail@web52709.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2004-12-14 at 08:08 -0800, Kamal R. Prasad wrote:
> --- Joe Kelsey <joe@zircon.seattle.wa.us> wrote:
> 
> > I have a desire to fix posix semaphores in at least
> > 5.3.  The current
> > implementation doesn't actually follow the "spirit"
> > of the standard,
> > even though it technically qualifies in a somewhat
> > degraded sense.  I
> > refer to the fact that the current implementation
> > treats posix
> > semaphores as completely contained inside the kernel
> > and essentially
> > divorced from the filesystem.  The true "spirit" of
> > the standard places
> > the semaphores directly in the file system, similar
> > to named pipes.
> > However the current implementation treats the
> > supplied "name" as a
> > 14-character identifier, required to begin with a
> > slash and contain no
> > other slashes.  Pretty weak.
> > 
> > Well, in order to fix this, we need to add file
> > system code and come up
> > with a new type.  
> 
> From the opengroup website:-
> 
> http://www.opengroup.org/onlinepubs/7990989775/xsh/sem_open.html
> 
> "It is unspecified whether the name appears in the
> file system and is visible to functions that take
> pathnames as arguments. "
> 
> >I currently have some time to
> > spend on something like
> > this and am willing to put in whatever effort it
> > takes.  Does anyone
> > want to add their own ideas or requirements?
> > 
> 
> You need to allow the user to provide a fully
> qualified pathname as an argument -and if the
> implementation doesn't allow that, that would be a
> BUG. But requiring the supplied name to be a valid
> pathname is not mandated by the std.

The current implementation FAILS to allow arbitrary pathnames.  The
current implementation arbitrarily restricts the name to a string of not
more than 14 characters optionally starting with a slash.  This does not
match pathnames on FreeBSD.

Yes, I agree that the standard does not require pathnames, but it does
say that the name can match the otherwise standardized pathname syntax
(at least the POSIX pathname standard).  The FreeBSD implementation
clearly FAILS to allow POSIX pathnames.

>  BTW -how would
> you deal with a diskless workstation running Freebsd?

Why does this matter?  If the system uses NFS, then all bets are off.
If the system contains a FreeBSD file system, thenit works.  What other
choice could there ever be?

/Joe




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1103047196.30309.254.camel>