IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 7, 2007, 11:40:53 AM (19 years ago)
Author:
jhoblitt
Message:

attempt to prevent endless iterations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/detrend_reject_exp.pl

    r14439 r15489  
    3131                       );
    3232my $ipprc = PS::IPP::Config->new(); # IPP configuration
     33
     34my $ITER_LIMIT = 20;
    3335
    3436use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
     
    281283}
    282284
     285# attempt to prevent endless, pathological iterations
     286if ($iter >= $ITER_LIMIT) {
     287    warn("iteration limit reached -- bailing out");
     288    exit($PS_EXIT_PROG_ERROR);
     289}
     290
    283291## add the summary statistics, and request a new iteration if needed
    284292$command = "$dettool -adddetrunsummary";
Note: See TracChangeset for help on using the changeset viewer.