Daemon::Easy - easily create a daemon


Daemon-Easy documentation  | view source Contained in the Daemon-Easy distribution.

Index


NAME

Top

Daemon::Easy - easily create a daemon

This is a pretty light weight module for easily creating a daemon.

The execution of the daemon is controlled by checking whether a stopfile exists in each running loop.

The pidfile stores the pid of the running daemon.

SYNOPSIS

Top

    use Daemon::Easy sleep=>5, stopfile=>'stop', pidfile=>'pid', callback=>'worker';

    sub worker{
        print "i am alive\n";
    }

    run();

    in the shell:
    ./yourdaemon.pl [start stop restart status]




DESCRIPTION

Top

AUTHOR

Top

Zhang Jun, < jzhang533@gmail.com >

COPYRIGHT AND LICENSE

Top


Daemon-Easy documentation  | view source Contained in the Daemon-Easy distribution.