ID: 39138
User updated by: php at koterov dot ru
Reported By: php at koterov dot ru
-Status: Feedback
+Status: Open
Bug Type: Filesystem function related
Operating System: Windows, Linux
PHP Version: 5.1.6
New Comment:
Ah, on Linux bug is reproducible at version 5.1.1. Sorry, I do not have
more recent test machine. On Windows - I've tested 5.1.6, bug is
reproducible.
Previous Comments:
------------------------------------------------------------------------
[2006-10-12 14:44:12] [EMAIL PROTECTED]
Not reproducible on Linux.
------------------------------------------------------------------------
[2006-10-12 14:19:19] php at koterov dot ru
Description:
------------
<?php
@session_write_close(); // be on the safe side
$f = fopen('/tmp/f.lck', 'a+');
var_dump(flock($f, LOCK_EX | LOCK_NB, $w));
var_dump($w);
sleep(5);
?>
When I run this script concurrently, all results are same: "bool(true)
int(0)". Seems LOCK_NB simply ignored.
P.S.
There is a lot of same bugs (e.g., http://bugs.php.net/bug.php?id=31363
etc.), but they are closed or outdated.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39138&edit=1