Re: prevent multiple start of app
- From: Larry I Smith <larryXiXsmith@xxxxxxxxxxx>
- Date: Sat, 25 Feb 2006 00:05:47 GMT
reppisch wrote:
That's not correct.
sem_open(const char *name, int oflag, ...);
is for creating inter-process semaphores.
We use it extensively for communicating between
multiple unrelated processes.
All the processes must know is the semaphore name.
Regards,
Larry
man 3 sem_init says the following about this:
...
sem_init initializes the semaphore object pointed to by sem. The count
associated with the semaphore is set initially to value. The pshared
argument indicates whether the semaphore is local to the current pro-
cess ( pshared is zero) or is to be shared between several processes (
pshared is not zero).
LinuxThreads currently does not support process-
shared semaphores, thus sem_init always returns with error ENOSYS if
pshared is not zero
...
System is a Red Hat Linux release 9 (Shrike) 2.4.20-8 #1
Am i missing something?
btw: I know that the system is not the cutting edge ;-) but required for
some ancient drivers for very special hardware.
Ok, one more time...
That's sem_open(), NOT sem_init().
They're two different semaphore systems.
Larry
.
- References:
- prevent multiple start of app
- From: reppisch
- Re: prevent multiple start of app
- From: "Nils O. Selåsdal"
- Re: prevent multiple start of app
- From: reppisch
- Re: prevent multiple start of app
- From: Larry I Smith
- Re: prevent multiple start of app
- From: reppisch
- prevent multiple start of app
- Prev by Date: Re: AF_UNIX sockets problem - no error but datagram never arrives - 5 attachments
- Next by Date: Re: Trolltech QT license question
- Previous by thread: Re: prevent multiple start of app
- Next by thread: Re: prevent multiple start of app
- Index(es):
Relevant Pages
|