From: minima Date: Mon, 28 Aug 2000 10:43:46 +0000 (+0000) Subject: allow a bit of slack after midnight waiting for new logfile to appear X-Git-Tag: R_1_44~8 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=5723719679b0bb4ddc55f32eb5ceb3cf59ee23ae;p=spider.git allow a bit of slack after midnight waiting for new logfile to appear --- diff --git a/perl/watchdbg b/perl/watchdbg index 6da3a586..ca3e2e3b 100755 --- a/perl/watchdbg +++ b/perl/watchdbg @@ -51,7 +51,11 @@ for (;;) { my @now = Julian::unixtoj(time()); if ($today[1] != $now[1]) { $fp->close; - $fh = $fp->open(@now) or die $!; + for (my $i = 0; $i < 20; $i++) { + last if $fh = $fp->open(@now); + sleep 5; + } + die $! if $i >= 20; @today = @now; } }