Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Dec 2002 12:02:47 -0500
From:      Craig Rodrigues <rodrigc@attbi.com>
To:        Joe Kelsey <joek@mail.flyingcroc.net>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Posix Semaphores in -CURRENT
Message-ID:  <20021213120247.A3188@attbi.com>
In-Reply-To: <3DFA0DAC.2070801@mail.flyingcroc.net>; from joek@mail.flyingcroc.net on Fri, Dec 13, 2002 at 08:41:16AM -0800
References:  <3DF8F08E.8050809@mail.flyingcroc.net> <3DFA0771.BDFC87A8@mindspring.com> <3DFA0DAC.2070801@mail.flyingcroc.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Dec 13, 2002 at 08:41:16AM -0800, Joe Kelsey wrote:
> >>portabliity issue as TRU64 (at least) allows arbitrary pathnames as
> >>sempahores, probably storing some sort of marker in the directories (I
> >>get this only from examining the TRU64 online manual pages at
> >>http://www.tru64unix.compaq.com/docs/base_doc/DOCUMENTATION/HTML/APS33DTE_html/DOCU_010.HTM


If you are going to argue about what FreeBSD should do, then in 
addition to checking with the TRU64 manual (TRU64 is probably in
its sunset stage: http://news.com.com/2100-1001-976211.html), you
should also refer to the POSIX standard:

http://www.opengroup.org/onlinepubs/007904975/


For the man page for sem_open(), there is this:

 sem_t *sem_open(const char *name, int oflag, ...);

"The name argument points to a string naming a semaphore object. It is 
 unspecified whether the name appears in the file system and is visible 
 to functions that take pathnames as arguments. The name argument conforms 
 to the construction rules for a pathname. If name begins with the slash 
 character, then processes calling sem_open() with the same value of name 
 shall refer to the same semaphore object, as long as that name has not been 
 removed. If name does not begin with the slash character, the effect is 
 implementation-defined. The interpretation of slash characters other than the 
 leading slash character in name is implementation-defined."

So apart from the leading slash character, nothing is mentioned about
embedded slashes in the semaphore name.  What's the right behavior
for FreeBSD then?

-- 
Craig Rodrigues        
http://www.gis.net/~craigr    
rodrigc@attbi.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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