Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Make a perl script self aware...

by snax (Hermit)
on Aug 01, 2003 at 14:06 UTC ( [id://280073]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Make a perl script self aware...

I suggest you read perlipc carefully -- there's a bunch of ways for processes to talk to one another. Make the script do *something* in order to listen, and make it's first job try to talk to where it "will be listening", and exit if it gets an "I'm already running" response. No such response means the new script should *start* listening, so that the next invocation can be told to bugger off :) There's a small race condition but I imagine that's hard to get around.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://280073]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.