Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Checking for multiple instances

by Your Mother (Archbishop)
on Sep 24, 2004 at 22:06 UTC ( [id://393693]=note: print w/replies, xml ) Need Help??


in reply to •Re: Checking for multiple instances
in thread Checking for multiple instances

That is very cool. Not to pester but would you give a snippet (or point to one) showing it in action?

Replies are listed 'Best First'.
•Re^3: Checking for multiple instances
by merlyn (Sage) on Sep 24, 2004 at 22:21 UTC
    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.

      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://393693]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-26 07:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found