X-Git-Url: http://git.roojs.org/?p=pear;a=blobdiff_plain;f=HTML%2FFlexyFramework%2FGenerator.php;fp=HTML%2FFlexyFramework%2FGenerator.php;h=05f78370c40c260a008c8a1aec5d7833ad74aa0b;hp=7a12dd01d3d5f0ab555d509d2d128c1a954f55fe;hb=7bac3551a4568f22e6273524a61fc57633b61cc8;hpb=e8aafd31f18e1a256ffe6ea87a447141a83ccc63 diff --git a/HTML/FlexyFramework/Generator.php b/HTML/FlexyFramework/Generator.php index 7a12dd01..05f78370 100644 --- a/HTML/FlexyFramework/Generator.php +++ b/HTML/FlexyFramework/Generator.php @@ -173,6 +173,9 @@ class HTML_FlexyFramework_Generator extends DB_DataObject_Generator static function writeCache($iniCacheTmp, $iniCache) { + $fp = fopen($iniCache.".lock", "r+"); + flock($fp,LOCK_EX); + $ff = HTML_FlexyFramework::get(); $ff->debug('Framework Generator:writeCache ' . $iniCacheTmp . ' ' . $iniCache); @@ -263,6 +266,11 @@ class HTML_FlexyFramework_Generator extends DB_DataObject_Generator } rename($iniCacheTmp. '.links.ini', $iniLinksCache); } + + flock($fp, LOCK_UN); + fclose($fp); + unlink($fp); + } /* bit like merge recursive, but it avoids doing stuff with arrays.. */ static function mergeIni($new, $old)