Re: [PHP] Practical flock() implementation

2001-06-25 Thread CC Zona
In article <030a01c0fd4a$0f797840$6401a8c0@Lynchux100>, [EMAIL PROTECTED] ("Richard Lynch") wrote: > > argument, so don't I *have* to fopen the file before going to flock()? Or > > should I fopen first in "r" mode, acquire the lock, then re-open in "w" > > mode, counting on the lock to stay in

Re: [PHP] Practical flock() implementation

2001-06-25 Thread Richard Lynch
> argument, so don't I *have* to fopen the file before going to flock()? Or > should I fopen first in "r" mode, acquire the lock, then re-open in "w" > mode, counting on the lock to stay in effect even though it's a different > file pointer? Yup. You are holding the lock, and it's yours > I'd

Re: [PHP] Practical flock() implementation

2001-06-23 Thread Manuel Lemos
Hello CC, On 23-Jun-01 17:25:54, you wrote: >I'm having trouble understanding the docs and annotations on flock(). I've >got a script that needs to overwrite a data file's contents without letting >Instance B of that script truncate the data file while Instance A is still >writing new conten

[PHP] Practical flock() implementation

2001-06-23 Thread CC Zona
I'm having trouble understanding the docs and annotations on flock(). I've got a script that needs to overwrite a data file's contents without letting Instance B of that script truncate the data file while Instance A is still writing new content to it. How do other people do this? It seems t