perlquestion
hackmare
<p>HI Monks,
<p>I am in the process of building a daemonized webservice and am looking for a good way to turn it on/off.
<p>What I'd really like to do is something like what apache does where you can call:
<br>httpd start
<br>httpd stop
<br>httpd restart
<p>I've seen shell scripts used to do something like this and would be a lot happier doing it in Perl, but there's still one nagging problem: I need to jeep the job running even if I kill my session.
<p>I can not find any way to do this other than through the use of nohup on the linux/unix. The trouble is that when I use nohup, I get issues in some of the instantiations within my script (it has an HTTP::Daemon listener which takes up to 30 seconds to reply under nohup for a reason I have not yet understood).
<p>So my questions are the following:
<p>1/ Is the a pure-perl replacement for nohup that would allow me to start a perl daemon and then keep it running even if I close my session?
<p>2/ Other than using something like semaphores or equivalent, can anyone think of a cute way to do 1/ above and restart the script by calling it?
<p>Thanks for putting up with this ignorance,
<p>Hackmare
<p>Roasp: <a href="http://www.roasp.com">Perl SVG Portal</a>