version 1.61, 2005/10/06 20:35:50
|
version 1.62, 2005/11/10 19:07:01
|
Line 98 sub start_daemon {
|
Line 98 sub start_daemon {
|
my $lfh=IO::File->new("$pidfile"); |
my $lfh=IO::File->new("$pidfile"); |
my $daemonpid=<$lfh>; |
my $daemonpid=<$lfh>; |
chomp($daemonpid); |
chomp($daemonpid); |
if (kill 0 => $daemonpid) { |
if ($daemonpid =~ /^\d+$/ && kill 0 => $daemonpid) { |
return 1; |
return 1; |
} else { |
} else { |
return 0; |
return 0; |
Line 134 sub checkon_daemon {
|
Line 134 sub checkon_daemon {
|
my $lfh=IO::File->new("$pidfile"); |
my $lfh=IO::File->new("$pidfile"); |
$daemonpid=<$lfh>; |
$daemonpid=<$lfh>; |
chomp($daemonpid); |
chomp($daemonpid); |
if (kill 0 => $daemonpid) { |
if ($daemonpid =~ /^\d+$/ && kill 0 => $daemonpid) { |
&log($fh,"<h3>$daemon at pid $daemonpid responding"); |
&log($fh,"<h3>$daemon at pid $daemonpid responding"); |
if ($send) { &log($fh,", sending $send"); } |
if ($send) { &log($fh,", sending $send"); } |
&log($fh,"</h3>"); |
&log($fh,"</h3>"); |