Problem with sem_get and semaphores
| From: | Rick Turbeville | Date: | Thu, 04 Oct 2001 19:52:37 +0000 |
| Subject: | Problem with sem_get and semaphores | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-69971@lists.php.net to get a copy of this message | ||
Hi,
I am trying to do a sem_get on a semaphore that has already been created by
a c program. Instead of getting back the semaphore id, I get:
Warning: semget() failed for key 0x576a: Invalid argument in
/usr/local/apache/htdocs/bioace/testshmop.php on line 5
I can see the semaphores by using "ipcs" and they appear to be there with
good permissions, etc.
If I call sem_get with a new id everything seems to work fine - the problem
is only if I try to interact with a semaphore created by another program.
Can sem_get not talk to semaphores in the outside world?
Any help is greatly appreciated.
Thanks,
Rick