--- loncom/loncron 2005/10/06 20:35:50 1.61 +++ loncom/loncron 2005/11/10 19:07:01 1.62 @@ -2,7 +2,7 @@ # Housekeeping program, started by cron, loncontrol and loncron.pl # -# $Id: loncron,v 1.61 2005/10/06 20:35:50 albertel Exp $ +# $Id: loncron,v 1.62 2005/11/10 19:07:01 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -98,7 +98,7 @@ sub start_daemon { my $lfh=IO::File->new("$pidfile"); my $daemonpid=<$lfh>; chomp($daemonpid); - if (kill 0 => $daemonpid) { + if ($daemonpid =~ /^\d+$/ && kill 0 => $daemonpid) { return 1; } else { return 0; @@ -134,7 +134,7 @@ sub checkon_daemon { my $lfh=IO::File->new("$pidfile"); $daemonpid=<$lfh>; chomp($daemonpid); - if (kill 0 => $daemonpid) { + if ($daemonpid =~ /^\d+$/ && kill 0 => $daemonpid) { &log($fh,"

$daemon at pid $daemonpid responding"); if ($send) { &log($fh,", sending $send"); } &log($fh,"

");