in reply to Re: Using flock() on files
in thread Using flock() on files

This creates a race condition. You must wrap it in some atomical locking mechanism. Between the time you check and the time you create, even if you ask sysopen for an exclusive create, several processes may think they possess the lock at the same time.

not a Good Thing™

-nuffin
zz zZ Z Z #!perl

Replies are listed 'Best First'.
Re: Re: Re: Using flock() on files
by benn (Vicar) on Apr 20, 2003 at 17:42 UTC
    doh! Ta - I knew that there was something vital missing even as I was pressing submit...
    note to self..don't post before 1st coffee - 'specially on a Sun. morning.