Reply to Re: When to flock

Your name:

Reply:


Posted by Toby A Inkster on 03/05/07 09:06

Karl Groves wrote:

> I've got a script which writes my blog's RSS feed (rather than dynamically
> generating it each time it is requested), and I'm not sure whether I should
> lock the file while I'm writing it.

Why would you want to? Assuming this script only runs every hour or two,
it's unlikely that two attempts will be made to write to the file
simultaneously. Of course if someone *reads* the file while it's being
written, they'll get a partial feed, but flock() doesn't change that.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация