my @warningfs;
my @islandids;
+my $maxmaxdist=35;
+my $maxcpu=90;
+
my $qa= \%ARGS;
my $routeparams= { EmsgRef => \$emsg, SayRequiredCapacity => 1 };
my $maxdist;
my $maxcountea=10;
-my $maxcpu=10;
</%perl>
</form>
<%perl>
-if (!$emsg && $maxdist > 30) {
- $emsg= "Searching for routes of more than 30 leagues is not".
+if (!$emsg && $maxdist > $maxmaxdist) {
+ $emsg= "Searching for routes of more than $maxmaxdist leagues is not".
" supported, sorry.";
}
}
push @rsargs, defined $routeparams->{LossPerLeaguePct}
? $routeparams->{LossPerLeaguePct}*0.01 : 1e-9;
+push @rsargs, '0';
push @rsargs, 'search',$maxdist, $maxcountea,$maxcountea, 'any', @islandids;
m/[^-.0-9a-zA-Z]/ and die "$_ $& ?" foreach @rsargs;
if (!$child) {
my $cpu= BSD::Resource::RLIMIT_CPU;
my ($soft,$hard)= getrlimit($cpu);
- setrlimit($cpu,$maxcpu,$hard) or die $! if $soft>$maxcpu;
+ setrlimit($cpu,$maxcpu,$hard) or die $! if $hard<=$maxcpu;
exec @rsargs;
die $!;
}