Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

•Re^3: Checking for multiple instances

by merlyn (Sage)
on Sep 24, 2004 at 22:21 UTC ( [id://393700]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Checking for multiple instances
in thread Checking for multiple instances

I can't find my working example right now, but from memory, something like this:
#!/usr/bin/perl use Fcntl qw(LOCK_EX LOCK_NB); flock DATA, LOCK_EX | LOCK_NB or die "Already executing!"; ... rest of code ... # do not remove this __END__! __END__

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^4: Checking for multiple instances
by Your Mother (Archbishop) on Sep 25, 2004 at 06:41 UTC

    Thanks, that's plenty, I'm sure. I was just a'scared there might be a trick to it that was different from vanilla flock'ing.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-25 14:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found