For Programmers: Free Programming Magazines  


Home > Archive > PHP Programming > September 2004 > flock









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author flock
jf

2004-09-29, 8:04 pm

Hi,

If I open a file with mode 'a' (ie fopen('file','a')), must I use flock to prevent concurrency access ?
I'm on a single server with no network file system.

Thanks.
Steve High

2004-09-29, 8:04 pm

jf <no@no.spam> wrote in message news:<20040929194520.109f9293@localhost>...
> Hi,
>
> If I open a file with mode 'a' (ie fopen('file','a')), must I use flock to prevent concurrency access ?
> I'm on a single server with no network file system.
>
> Thanks.


if it's just you, it isnt necessary...unless of course your are
performing multiple tasks with the same file at the same time

if it's a file with shared access, then you should always lock it
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com