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>
I'm using named semaphores to share them acriss processes. Parent
process opens and initializes them while child processes simply open
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?
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).
- 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