On Thursday 20 December 2012 23:23:43 Stas Malyshev wrote: > Hi! > > > Is include supposed to take a LOCK_EX somehow? I can neither see that in > > php- src (5.4.9) nor APC-trunk, doing a cursory grepping. > > I'm not sure how any lock would help, since locks are optional, meaning > you still can do the same thing without the locks.
I'm well aware of the advisory nature of file locks. include taking a LOCK_EX could have helped - when any .tpl file modifying code also does LOCK_EX. I do NOT want to propose include doing that! It's just that the original poster or whoever created that piece of code with LOCK_EX in the file_put_contents(), apparently thought it might work out that way. tmpfiles and rename are definitely the correct way to handle that. best regards Patrick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php