|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 23:00:01 2025 UTC |
Description: ------------ If I write a program with a sem_get and auto_release=0, in case of shutdown, an other program should not be available to take the semaphore. Launch two times the following script (in cli in my case). Kill the first with Ctrl+C within 10 secs. The second display "Acquire". PHP Version : Ubuntu 5.3.2-1ubuntu4.2 Test script: --------------- $seg = sem_get("123554", 1, 0666, 0) ; sem_acquire($seg); echo "Acquire\n"; sleep (10); Expected result: ---------------- Don't display "Acquire" and stay pending until I remove the semaphore by another way. If you remove the sleep, you shouldn't be available to run the script 2 times : the first display Acquire, and the second should wait until the semaphore is removed. Actual result: -------------- Display "Acquire" and then enter in sleep 10.