Re: sem_init: pshared=0 difference between Linux and NetBSD

Valery Ushakov <[email protected]>
Newsgroups gmane.os.netbsd.current
Message-ID <[email protected]>
On Tue, Feb 03, 2026 at 10:23:46 +0100, Thomas Klausner wrote:

> Upstream found that even when pshared=0, the POSIX semaphore on NetBSD
> is shared among processes (i.e. across fork).
> 
> https://dev.gnupg.org/rE20c673e15bd772ee39f626f8203427b5f47601b7
> 
> Is this a bug in the NetBSD implementation, or are we just in the
> undefined space of the specification and it's an "implementation
> difference"?

Note, that NetBSD uses kernel semaphores (see _ksem(2) for rtfm, and
src/lib/librt/sem.c for rtfs).

-uwe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.