flock() Race Condiiton?

Christopher Milton cmiltonperl at yahoo.com
Fri May 10 13:36:12 CDT 2002


--- Keary Suska <hierophant at pcisys.net> wrote:
> Is anyone aware of a possible flock() race condition that could cause two
> processes vying for a lock to effectively lock each other out, and at the
> same time, lock out any access to that file? I am trying to debug a rather
> mysterious problem where a parallel processing system just hangs for some
> reason.

According to 'perldoc perlfunc':
               Two potentially non-obvious but traditional flock
               semantics are that it waits indefinitely until the
               lock is granted, and that its locks merely
               advisory.  Such discretionary locks are more
               flexible, but offer fewer guarantees.  This means
               that files locked with flock() may be modified by
               programs that do not also use flock(). 




__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Mother's Day is May 12th!
http://shopping.yahoo.com



More information about the Pikes-peak-pm mailing list