#25961 [Opn]: sem_get with fixed IDC_CREAT flag
| From: | iliaa@php.net | Date: | Fri, 24 Oct 2003 02:42:10 +0000 |
| Subject: | #25961 [Opn]: sem_get with fixed IDC_CREAT flag | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969356701@lists.php.net to get a copy of this message | ||
ID: 25961
Updated by: iliaa@php.net
Reported By: daredevil at rozmova dot if dot ua
Status: Open
-Bug Type: Semaphore related
+Bug Type: Documentation problem
Operating System: FreeBSD, cygwin
PHP Version: 4.3.3
New Comment:
It seems strange that IPC_CREATE flag is always set, but it's removal
will break backwards compatibility. The only way I see that this
problem could be resolved is by adding another optional argument to the
function, which would disable IPC_CREATE flag.
Previous Comments:
------------------------------------------------------------------------
[2003-10-23 02:51:32] daredevil at rozmova dot if dot ua
Description:
------------
in the sem_get function, according to the source code,
semaphore *always* getting with IPC_CREATE flag. That is unnecessary in
situations, when I wanna get an existing semaphore, not to create a new
one.
Also in the Documentation You should mention, that a PHP semaphore is
really THREE of them! Because when writing an client-server app (php as
a client platform ang C/C++ as a server platform), and a semaphore is
created in C++ as semget(key, 1(!), IPC_CREATE | 0666) - I need onle
one! When trying to reach it in php sem_get(key) php handles an "ivalid
argument exception" because php wanna re-create the semaphore set from
1 to 3.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25961&edit=1