Subject: Re: POSIX semaphores - threads only?
To: None <>
From: Matthew Mondor <>
List: tech-kern
Date: 12/06/2007 12:29:00
On Thursday, 6 Dec 2007 11:17:17
Andrew Doran <> wrote:

> I was wrong. Anonymous semaphores will only be shared if the
> process forks,but does not exec. If you mmap() a region and it has
> a semaphore then youare out of luck.

After re-reading the man pages, if I understand, sem_open(3) deals
with named semaphores which can be shared without problems among
multiple processes, whereas sem_init(3) creates unnamed ones, which
are subject to this restriction?

If so, I don't believe it is a problem.  I was confused about the
semantics (after initially reading the man pages I had the impression
that sem_open() was needed to initialize a resource which was required
for subsequent sem_init() calls, but they appear to be two different

Thanks again,
Matthew Mondor