You are here: Re: How to get to know if file is currently being written by another app? « PHP Programming Language « IT news, forums, messages
Re: How to get to know if file is currently being written by another app?

Posted by Gordon Burditt on 11/15/07 01:07

>> Flock doesn't fit me. Flock is used to make lock
>> FROM WITHIN php script.
>
>Indeed. So if a PHP script can obtain an exclusive (writer's) lock on
>a file, it means that no other process has that lock, meaning that the
>file is not open for writing at the moment...

flock() is advisory, meaning that it won't stop someone else from
reading or writing, unless that someone else is obtaining locks
before doing the reading or writing. *Mandatory* locking has great
potential for evil (e.g. lock some critical system files, then go
to sleep indefinitely, and anyone trying to log in ends up waiting
for you to let go of the locks).

 

Navigation:

[Reply to this 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

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