|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-03-22 21:05 UTC] tony2001@php.net
[2006-03-22 21:51 UTC] mauroi at digbang dot com
[2006-03-22 22:10 UTC] mauroi at digbang dot com
[2006-03-22 22:57 UTC] mauroi at digbang dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 09:00:01 2025 UTC |
Description: ------------ If I execute two consecutive times (in different browser tabs) the following script, LOCK_NB doesn't work. I mean, the second tab waits for the first to finish. Thanks in advance. Reproduce code: --------------- <? $handle = fopen('c:\foo', 'w+'); if ($handle) { if (flock($handle, LOCK_EX + LOCK_NB)) { echo 'locked!'; sleep(5); } else { echo 'not locked!'; } fclose($handle); } ?> Expected result: ---------------- 1st: locked! 2nd: locked! Actual result: -------------- 1st: locked! 2nd: not locked!