Beefy Boxes and Bandwidth Generously Provided by pair Networks
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 18:06 UTC ( [id://280073]=note: print w/replies, xml ) Need Help??


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
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-20 00:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found