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.