Exclusive File Access
am 26.08.2009 18:35:49 von Warren Vail
------=_NextPart_000_028B_01CA2630.9922A270
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
I have two processes running on the same server, one is creating a file,
loading it with data, and this process runs real slow.
The second process processes a directory, finds the new file and begins
reading the file contents.
How do I make the reading process detect that the file is still being filled
with data in PHP?
Warren Vail
Vail Systems Technology
------=_NextPart_000_028B_01CA2630.9922A270--
Re: Exclusive File Access
am 26.08.2009 20:00:03 von Phpster
On Wed, Aug 26, 2009 at 12:35 PM, Warren Vail wrote:
> I have two processes running on the same server, one is creating a file,
> loading it with data, and this process runs real slow.
>
>
>
> The second process processes a directory, finds the new file and begins
> reading the file contents.
>
>
>
> How do I make the reading process detect that the file is still being filled
> with data in PHP?
>
>
>
> Warren Vail
>
> Vail Systems Technology
>
>
>
>
lock it with www.php.net/flock
--
Bastien
Cat, the other other white meat
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Exclusive File Access
am 27.08.2009 12:37:37 von Lupus Michaelis
Bastien Koert wrote:
> lock it with www.php.net/flock
But you remain to be carefull, because flock is more like a semaphore
: it doesn't really lock the file. See man page for flock. (Maybe under
MS Windows the lock is hard).
--
Mickaël Wolff aka Lupus Michaelis
http://lupusmic.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php