This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Posix semaphore between different processes
- To: "H . J . Lu" <hjl at valinux dot com>
- Subject: Re: Posix semaphore between different processes
- From: Ulrich Drepper <drepper at redhat dot com>
- Date: 28 Nov 2000 10:49:09 -0800
- Cc: GNU C Library <libc-alpha at sourceware dot cygnus dot com>
- References: <20001128103527.B2722@valinux.com>
- Reply-To: drepper at cygnus dot com (Ulrich Drepper)
"H . J . Lu" <hjl@valinux.com> writes:
> Currently, our Posix semaphore doesn't support different processes. Can
> we implement our Posix semaphore with SYSV semaphore for inter-process
> POSIX semaphore? We can have Posix semaphore derived from SYSV
> semaphore in libc and the one in pthread will override them.
I don't even want to start with this. All you can achieve is a poor
quality imitation. You cannot work with the SysV stuff alone since
you cannot implement the namespace handling correctly. Adding some
regular files to implement the namespace side only means that you open
all kind of security holes and possibilities to screw up the system.
If you want to have POSIX semaphores implement them in the kernel.
Jakub has a POSIX message queue implementation, following the concept
of the POSIX shared memory implementatino (i.e., use it to implement
the SysV variant and add a pseudo filesystem). You'll have to do the
same for semaphores.
--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------