Re: sem_open/sem_unlink errors
- From: "Pierre L." <lombard.pierre@xxxxxxxxx>
- Date: 20 Jan 2007 15:30:49 -0800
On Jan 20, 10:40 am, "Maxim Yegorushkin" <maxim.yegorush...@xxxxxxxxx>
wrote:
psp wrote:
I'm using named semaphores to share them acriss processes. Parent
process opens and initializes them while child processes simply open
them.
Once in a while the sem_open call in the parent fails because I've a
OCREAT&O_EXCL flag. However, if I remove the O_EXCL flag it works. I
know this error occurs because it means this semaphore already exists,
but when I do a ipcs from command line I don't see any semaphores.Are you sure that ipcs can show you POSIX semaphores?
man ipcs
ipcs - report XSI interprocess communication facilities status
...
POSIX ipc have names in the filesystem. XSI ipc do not, this seem to be
the reason why ipcs command exists.
FWIW, named semaphores appear in the devshm file system under linux 2.6
(ls -l /dev/shm - ymmv).
--
Pierre
.
- References:
- sem_open/sem_unlink errors
- From: psp
- Re: sem_open/sem_unlink errors
- From: Maxim Yegorushkin
- sem_open/sem_unlink errors
- Prev by Date: Re: blocking/nonblocking socket and select -> usefull?
- Next by Date: Re: blocking/nonblocking socket and select -> usefull?
- Previous by thread: Re: sem_open/sem_unlink errors
- Next by thread: what is the best way of passing floats into a string
- Index(es):
Relevant Pages
|