Re: svn commit: r200274 - head/lib/libc/gen

[ Available lists | Index of svn-src-all | Month of Dec 2009 | Week of 9 Dec 2009 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Andrew Gallatin <gallatin@cs.duke.edu>
Date
9 Dec 2009 13:54:33
Subject
Re: svn commit: r200274 - head/lib/libc/gen
Message-ID
4B1FAC12.6080907@cs.duke.edu


[ Hide this part ]
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



Elapsed time: 0.213 seconds