in reply to Re: flock
Furthermore, after you flock, you should seek to the end of the file, just in case another process appended to the file while you were waiting for the lock (but after you opened the file):
open FH, ">>foo" or die "Can't open foo: $!"; flock FH, 2; seek FH, 0, 2;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Re: flock
by turnstep (Parson) on Apr 04, 2000 at 07:52 UTC |