Bug->Doc #71956 [Opn->Ver]: sem_get(0) creating an infinite amount of semaphores

From: Date: Sun, 01 Mar 2020 22:56:02 +0000
Subject: Bug->Doc #71956 [Opn->Ver]: sem_get(0) creating an infinite amount of semaphores
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-17352@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71956&edit=1 ID: 71956 Updated by: cmb@php.net Reported by: kakkau at grr dot la -Summary: sem_get: creating an infinite amount of semaphores +Summary: sem_get(0) creating an infinite amount of semaphores -Status: Open +Status: Verified -Type: Bug +Type: Documentation Problem Package: Semaphore related PHP Version: Irrelevant Block user comment: N Private report: N New Comment: sem_get() calls semget() with the unmodified key, and IPC_PRIVATE likely has the value 0, so the behavior is expected, albeit undocumented. Previous Comments: ------------------------------------------------------------------------ [2016-04-04 09:30:32] kakkau at grr dot la Description: ------------ 1. run sem_get(0,0) multiple times 2. check ipcs -s 3. see there are multiple semaphores created For any other integer <> 0 sem_get works as expected. It returns a resource w/o creating another semaphore. Test script: --------------- <?php sem_get(0,0); sem_get(0,0); ?> Expected result: ---------------- No creation of another semaphore. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=71956&edit=1

« previous php.doc.bugs (#17352) next »