projects
/
gitmo/MooseX-Daemonize.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
8a4b7cf
)
withpidfile should write its pidfile :)
Stevan Little [Mon, 3 Dec 2007 02:22:09 +0000 (
02:22
+0000)]
lib/MooseX/Daemonize/WithPidFile.pm
patch
|
blob
|
blame
|
history
t/30.with_pid_file.t
patch
|
blob
|
blame
|
history
diff --git
a/lib/MooseX/Daemonize/WithPidFile.pm
b/lib/MooseX/Daemonize/WithPidFile.pm
index
7bc0de8
..
1e17a13
100644
(file)
--- a/
lib/MooseX/Daemonize/WithPidFile.pm
+++ b/
lib/MooseX/Daemonize/WithPidFile.pm
@@
-21,11
+21,13
@@
has pidfile => (
);
after 'daemonize' => sub {
+ my $self = shift;
# NOTE:
# make sure that we do not have
# any bad PID values stashed around
# - SL
- (shift)->pidfile->clear_pid
+ $self->pidfile->clear_pid;
+ $self->pidfile->write if $self->is_daemon;
};
1;
diff --git
a/t/30.with_pid_file.t
b/t/30.with_pid_file.t
index
61414a7
..
e26d142
100644
(file)
--- a/
t/30.with_pid_file.t
+++ b/
t/30.with_pid_file.t
@@
-41,8
+41,6
@@
$ENV{MX_DAEMON_STDERR} = catfile($CWD, 'Err.txt');
$self->daemonize;
return unless $self->is_daemon;
- $self->pidfile->write;
-
# make it easy to find with ps
$0 = 'test-app';
$SIG{INT} = sub {