Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 Dec 2009 08:54:26 -0500
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Jilles Tjoelker <jilles@stack.nl>
Subject:   Re: svn commit: r200274 - head/lib/libc/gen
Message-ID:  <4B1FAC12.6080907@cs.duke.edu>
In-Reply-To: <200912081742.58162.jhb@freebsd.org>
References:  <200912082048.nB8Km6aP099420@svn.freebsd.org> <200912081645.37356.jhb@freebsd.org> <20091208221028.GA57735@stack.nl> <200912081742.58162.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin wrote:

> The fact that we don't fail attempts to use pshared outright is probably 
> dubious.  They cannot possibly work as currently implemented aside from fork() 
> since the structure embeds a file descriptor and file descriptor indices are a 
> per-process namespace, not a global namespace.

FWIW, this is what confused me.  It tends to be kind of a land-mine,
since programs can be ported from Linux, and appear to work at first
for casual use.  If we don't support pshared, we should return an error
from sem_init() to make it obvious.

Also, perhaps the sem_init() man page should mention sem_open(), since
that seems to be the only way to really share a semaphore between
processes on FreeBSD.

Drew





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