in reply to perl daemon

If you're asking if you're on the right track, I think so. In theory, one would start it via /etc/init.d in Linux and the system services in Windows, just as you say.

Do you have a more specific question? It's difficult to understand exactly what you're asking as you seem to have answered yourself quite nicely.

Replies are listed 'Best First'.
Re: Re: perl daemon
by Anonymous Monk on Apr 05, 2003 at 00:26 UTC
    Lets assume the following piece of code:
    #/usr/bin/perl -w use strict; my $count = 0; while (1) { open(FILE,"filename.txt"); print FILE "$count - \n"; close(FILE); sleep(100); count++; }
    If i wanted that piece of code to run at startup, does anything special need to be done with it, to run it from /etc/init.d

    If the init script is as follows (cut down for example purposes):
    case "$1" in start) daemon /usr/local/bin/myscript.pl ;; stop) #stop stuff here ;; esac
      perldoc perlipc has a section on creating daemon processes (for UNIX).
      For Windows, you may not need to do anything special other than adding the script as a service but I'm no Windows expert.

      Hope this helps.

      --perlplexer