[Tutor] Re: Checking a file size before moving it

alan.gauld@bt.com alan.gauld@bt.com
Mon Feb 3 12:35:13 2003


> > The fcntl function allows you to get a lock. If the file is already 
> 
> First of all, fcntl won't tell you if a file is being accessed if it
> isn't locked.  

That's true. I was assuming (always dangerous! :) that only locked files

would cause a problem. I also assume (but haven't checked!) that Unix 
will lock a file that's being written to? That's all the sleep solution 
protects against too...

Alan g