Mantis - Quercus
Viewing Issue Advanced Details
1504 feature always 12-10-06 08:47 01-04-07 14:34
at4u GNU/Linux  
ferg Gentoo Linux  
normal N/A  
closed 3.0.22  
fixed  
none    
none 3.1.1  
0001504: flock isn't available
Hi,

while testing Resin 3.0.22 / Quercus I found out that flock seems to be not implemented or not returning TRUE on success.

Script:
<?php
$f_fp = fopen ("test.xml","r");

$f_counter = 3;

if ($f_fp)
{
 do
 {
  if (flock ($f_fp,LOCK_SH)) { $f_counter = -1; }
  else
  {
   $f_counter--;
   sleep (1);
  }
 }
 while ($f_counter > 0);

 if ($f_counter > -1) { echo "LOCK_SH failed"; }
 else { echo "LOCK_SH successfully"; }

 fclose ($f_fp);
}
?>

This script will always result in "LOCK_SH failed". It returns "LOCK_SH successfully" while being executed by a Apache/PHP combination.
ferg set bug 0000634 to the status "closed". If this means that flock is implemented, than something doesn't work as expected.

There are no notes attached to this issue.