Daemon::Simple - Perl extension for making script as daemon with start|stop controlling on unix system


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

Index


NAME

Top

Daemon::Simple - Perl extension for making script as daemon with start|stop controlling on unix system

SYNOPSIS

Top

  use Daemon::Simple;

  Daemon::Simple::init($command);

  or

  Daemon::Simple::init($command,"~/");

  or

  my $homedir = `pwd`; chomp($homedir);
  my $pidfile = "/var/run/ffencoder.pid";
  my $command = $ARGV[0];
  Daemon::Simple::init($command,$homedir,$pidfile);

  ## Daemon script ##
  open(FILE,">out.txt");
  select(FILE);




  sleep(10);
  close(FILE);
  __END__

  # in shell
  $ perl foo.pl start
  $ perl foo.pl stop

DESCRIPTION

Top

This module is good for making a script as a daemon. A daemon script has start|stop controlling command. It is simple by adding Daemon::Simple::init() on first line of script.

This module is implemented by wrapping Proc::Daemon.

EXPORT

None by default.

SEE ALSO

Top

Proc::Daemon

Proc::ProcessTable

AUTHOR

Top

HyeonSeung Kim, <sng2nara@hanmail.net>

COPYRIGHT AND LICENSE

Top


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