php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42381 Double-flock()ing a file crashes
Submitted: 2007-08-22 15:13 UTC Modified: 2007-08-23 01:00 UTC
From: phpbugs dot 20 dot zsh at spamgourmet dot com Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.2.3 OS: Windows XP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: phpbugs dot 20 dot zsh at spamgourmet dot com
New email:
PHP Version: OS:

 

 [2007-08-22 15:13 UTC] phpbugs dot 20 dot zsh at spamgourmet dot com
Description:
------------
Double-flock()ing a file with different handles crashes. 

Reproduce code:
---------------
<?php
$fp = fopen('generic-textfile.txt', 'w');
flock($fp, LOCK_EX);
$fp2 = fopen('generic-textfile.txt', 'w');
flock($fp2, LOCK_EX);
echo 'Dun!';
?>

Expected result:
----------------
Dun!

Actual result:
--------------
Nothing

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-23 01:00 UTC] stas@php.net
Can't reproduce ceashing. What you probably seeing is php waiting on flock until it's killed by the timeout thread. 
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Nov 30 12:00:01 2025 UTC