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

From: Date: Sat, 14 Mar 2020 15:34:05 +0000
Subject: Doc #71956 [Ver->Csd]: sem_get(0) creating an infinite amount of semaphores
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-17418@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(0) creating an infinite amount of semaphores -Status: Verified +Status: Closed Type: Documentation Problem Package: Semaphore related PHP Version: Irrelevant -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2020-03-14 15:33:42] cmb@php.net Automatic comment from SVN on behalf of cmb Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=349425 Log: Fix #71956: sem_get(0) creating an infinite amount of semaphores ------------------------------------------------------------------------ [2020-03-01 22:56:01] cmb@php.net sem_get() calls semget() with the unmodified key, and IPC_PRIVATE likely has the value 0, so the behavior is expected, albeit undocumented. ------------------------------------------------------------------------ [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 (#17418) next »