Revision history for MooseX-Daemonize
+ * MooseX::Daemonize
+ - Made default pidbase '/var/run' rather than './var/run'
+ - Small fixups to pidfile testing in t/31.with_pid_file_and_poe.t
+
0.06 Fri. Dec. 21, 2007
* MooseX::Daemonize
- Fix logic that kills process so it doens't always warn
coerce => 1,
required => 1,
lazy => 1,
- default => sub { Path::Class::Dir->new('var', 'run') },
+ default => sub { Path::Class::Dir->new('', 'var', 'run') },
);
has basedir => (
$ENV{MX_DAEMON_STDOUT} = catfile($CWD, 'Out.txt');
$ENV{MX_DAEMON_STDERR} = catfile($CWD, 'Err.txt');
+unlink $PIDFILE; # clean up anythinf leftover by last run
+
{
package MyFooDaemon;
use Moose;
},
terminate => sub {
my ($kernel, $heap) = @_[KERNEL, HEAP];
+ $self->pidfile->remove if $self->pidfile->pid == $$;
}
},
heap => [ 0 ]