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

Re: Gracefully exiting and restarting at a later time.

by LanX (Saint)
on Dec 22, 2011 at 15:38 UTC ( [id://944796]=note: print w/replies, xml ) Need Help??


in reply to Gracefully exiting and restarting at a later time.

IMHO all answers you got so far dealt with "how do I preserve the state persistently such that I can safely continue"

But I understand your question as "how do I tell a running program to stop and to resume"

Two ideas come into my mind if you don't want to pull information from the file-system:

1. A signal-handler:

(Generally intercepting all "kill" signals is anyway a good idea in your case) The perl cookbook has examples regarding sig-handlers.

2. Putting everything into a Webservice and sending the stop message via http.

HTH :)

Cheers Rolf

UPDATE:

maybe a good read: perlipc

  • Comment on Re: Gracefully exiting and restarting at a later time.

Log In?
Username:
Password:

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

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

    No recent polls found