From: Brian Candler Date: 2003-07-26T00:51:34+09:00 Subject: Re: Confused about locking a file via file.flock(File::LOCK_EX) On Sat, Jul 26, 2003 at 12:40:51AM +0900, Travis Whitton wrote: > Flock only works within the same process. Locking works between processes, but in general locks are "advisory". That means that process A and process B must both agree to use the locking protocol. If process A locks a file, that doesn't actually prevent process B going ahead and writing to the file, if it doesn't bother to get a lock first. It gets confusing when there are about 3 different locking mechanisms (flock, lockf, and some ioctl-locking) but I don't have my Stevens book with me so I can't give you the gory details :-) Cheers, Brian.