ID:               48321
 User updated by:  php at alishabeth dot com
 Reported By:      php at alishabeth dot com
 Status:           Bogus
 Bug Type:         Filesystem function related
 Operating System: Ubuntu 9.04
 PHP Version:      5.2.6
 New Comment:

If the file handle and lock are released by the time you get to the
sleep() call (after the function invocation) then why does the call to
flock() block at all when you call it the second time?  Based on your
description it should be available to lock.


Previous Comments:
------------------------------------------------------------------------

[2009-05-19 22:49:47] [email protected]

This is really simple actually. Move the sleep inside the function and

it will work the same way as the "inline" version. 

What happens is when you use the function, once the function is run, 
there are no more references pointing to the opened file pointer and 
it's garbage cleaned (and unlocked) before your sleep() call.

------------------------------------------------------------------------

[2009-05-19 17:48:48] php at alishabeth dot com

Is anyone able to reproduce on previous versions such as those I've
found it on?  

If so should the documentation be updated to note this issue?

------------------------------------------------------------------------

[2009-05-19 17:44:50] [email protected]

Can't reproduce on 5.2.9.

------------------------------------------------------------------------

[2009-05-19 17:29:41] php at alishabeth dot com

I'm sorry, building your latest source to test this further is not
something I can do.  I'm hopeful that you have enough developers that
you can use the test case I provided to reproduce this yourselves.

Thanks

------------------------------------------------------------------------

[2009-05-19 07:37:07] [email protected]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/



------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/48321

-- 
Edit this bug report at http://bugs.php.net/?id=48321&edit=1

Reply via email to