NAME
Daemon::Simple - Perl extension for making script as daemon with start|stop controlling on unix system
SYNOPSIS
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
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
Proc::Daemon
Proc::ProcessTable
AUTHOR
HyeonSeung Kim, <sng2nara@hanmail.net>
COPYRIGHT AND LICENSE
Copyright (C) 2007 by sng2nara
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 118:
=cut found outside a pod block. Skipping to next block.