Only check pidfile if it exists.
This commit is contained in:
parent
9330b05af8
commit
c317f9575a
@ -163,8 +163,11 @@ sub detach {
|
||||
sub running {
|
||||
my $self = shift;
|
||||
|
||||
my $pid = eval { read_pid($self -> {"pidfile"}) };
|
||||
my $pid;
|
||||
if(-f $self -> {"pidfile"}) {
|
||||
eval { $pid = read_pid($self -> {"pidfile"}) };
|
||||
print $@ if($@);
|
||||
}
|
||||
return 0 if(!$pid);
|
||||
|
||||
my $signalled = kill 0,$pid;
|
||||
|
Loading…
x
Reference in New Issue
Block a user