+my $td = time() - $oldtime;
+if ($td < $every) {
+ # Not time to recheck yet
+ #print "Not rechecking; ", $every - $td, " seconds to go.\n";
+ exit $oldstatus;
+}
+
+my ($pid, $hung, $exitstatus);
+$SIG{ALRM} = sub {
+ kill 9, $pid;
+ $hung = 1;
+};
+alarm 10;
+
+$pid = open CHECK, '-|', $checkcommand;