From owner-freebsd-current Fri Dec 13 8:56:12 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 712DE37B401 for ; Fri, 13 Dec 2002 08:56:11 -0800 (PST) Received: from gilliam.users.flyingcroc.net (gilliam.users.flyingcroc.net [207.246.128.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id E8F8743EA9 for ; Fri, 13 Dec 2002 08:56:10 -0800 (PST) (envelope-from joek@mail.flyingcroc.net) Received: from mail.flyingcroc.net (zircon.staff.flyingcroc.net [207.246.150.92]) by gilliam.users.flyingcroc.net (8.9.3/8.9.3) with ESMTP id IAA65686 for ; Fri, 13 Dec 2002 08:56:10 -0800 (PST) Message-ID: <3DFA112A.6090209@mail.flyingcroc.net> Date: Fri, 13 Dec 2002 08:56:10 -0800 From: Joe Kelsey User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.1) Gecko/20021211 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-current@FreeBSD.ORG Subject: Re: Posix Semaphores in -CURRENT References: <3DF8F08E.8050809@mail.flyingcroc.net> <3DFA0771.BDFC87A8@mindspring.com> <3DFA0DAC.2070801@mail.flyingcroc.net> <200212131650.gBDGoXLj017598@khavrinen.lcs.mit.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Garrett Wollman wrote: > < said: > > >>So, is there some mechanism I am missing? Is there a layer between the >>application calling sem_open and the kernel receiving the parameters >>that strips it down to the last component? If there is a higher level >>involved here, why is the low-level ksem_create function worrying about >>embedded '/' characters? > > > I find this rather puzzling. Speaking as a standards person, I can > state with some certainty that *the name of a POSIX semaphore is > intended to have path name semantics*. It is not required to be an > actual path name, but there is a clear expectation that a quality > implementation will do so. The POSIX developers saw these IPC objects > as being analogous to shared memory objects or fifos, and did not see > a compelling reason to invent an entirely new namespace for them. What are you puzzled about? I am asking why uipc_sem.c checks for embedded slashes. I agree with you that it should allow arbitrary pathname strings as semaphores and it appears to me that it does not, in fact, allow arbitrary pathname strings as named semaphores. I am asking where my misunderstanding of uipc_sem.c is, or if I do understand it correctly, why does it place this restriction on named semaphores. > Stevens actually suggests an implementation of named semaphores in > which the semaphore is represented by a file which contains the name > (``key'') of an SVID semaphore. That would be a truly horrid implementation of named posix semaphores. I was hoping to get away from all SVID-related anachronisms here. /Joe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message