Bug 61702 - flock() broke in php-4.0.6-13
flock() broke in php-4.0.6-13
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: php (Show other bugs)
7.0
i386 Linux
high Severity medium
: ---
: ---
Assigned To: Joe Orton
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-03-23 00:56 EST by Alexander Kourakos
Modified: 2007-03-26 23:52 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-04-05 08:28:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
flock() test script (280 bytes, text/plain)
2002-03-23 00:58 EST, Alexander Kourakos
no flags Details

  None (edit)
Description Alexander Kourakos 2002-03-23 00:56:11 EST
Description of Problem: flock($open_fp, LOCK_EX) always returns a false value
(and fails to lock).

Version-Release number of selected component (if applicable): php-4.0.6-13

How Reproducible: I used the following command-line script (but the bug occurs
from within mod_php too):

#!/usr/bin/php -q
<?php
  if (!($fp = fopen('/tmp/lock.file', 'r'))) {
    die("couldn't open file to lock\n");
  } else {
    flock($fp, LOCK_EX) or print "couldn't get lock!!\n";
    print "HELLO\n"; sleep(5); print "GOODBYE\n";
    flock($fp, LOCK_UN);
    fclose($fp);
  }
?>

Additional Information:
It was working fine in php-4.0.6-9.7.0
Comment 1 Alexander Kourakos 2002-03-23 00:58:16 EST
Created attachment 49807 [details]
flock() test script
Comment 2 Joe Orton 2004-04-05 08:28:02 EDT
Thanks for the report.  This seems to work OK in current release when
the test script is corrected to pass 'w' to fopen; please reopen if
there are still problems.

Note You need to log in before you can comment on or make changes to this bug.