Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Mysterious Disapperance of file contents

by bobn (Chaplain)
on Aug 29, 2003 at 02:11 UTC ( #287569=note: print w/replies, xml ) Need Help??


in reply to Mysterious Disapperance of file contents

Oops, nevermind.

I beleive this is a race condition:

open(SEM, ">$semaphore_file") || die "Cannot create semaphore $semapho +re_file: $!"; flock(SEM, LOCK_EX) || die "Lock failed: $!";
I believe it's possible for 2 instances to execute the first line above at the same time, before either gets to the second.

--Bob Niederman, http://bob-n.com

All code given here is UNTESTED unless otherwise stated.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://287569]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2020-05-31 04:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (173 votes). Check out past polls.

    Notices?