X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=yarrg%2Fweb%2Fquery_routesearch;h=9accc54bbf2dbf31987948bc2e8e2606457f2ba9;hb=d14a97ff4e453ad1540a02b465bb7e398303edde;hp=bbeba5b522e59ce506ec29d9fb334fa01ae93334;hpb=f2f25e1201a92e62c3eeb35cdec0a62539e18cb5;p=ypp-sc-tools.db-live.git diff --git a/yarrg/web/query_routesearch b/yarrg/web/query_routesearch index bbeba5b..9accc54 100644 --- a/yarrg/web/query_routesearch +++ b/yarrg/web/query_routesearch @@ -46,12 +46,14 @@ $emsgokorprint %args> <%perl> +use BSD::Resource; + my $emsg; my @warningfs; my @islandids; my $qa= \%ARGS; -my $routeparams= { EmsgRef => \$emsg, SayOptionalCapital => 1 }; +my $routeparams= { EmsgRef => \$emsg, SayRequiredCapacity => 1 }; my $maxdist; %perl> @@ -70,11 +72,15 @@ This feature is not available from the "drop down menus" interface. &> <&| enter_advrouteopts, qa=>$qa, dbh=>$dbh, routeparams=>$routeparams &> +
+<%perl> +} + +unshift @rsargs, sourcebasedir().'/yarrg/routesearch'; + +my $fh= new IO::File; +my $child= $fh->open("-|"); defined $child or die $!; +if (!$child) { + my $cpu= BSD::Resource::RLIMIT_CPU; + my ($soft,$hard)= getrlimit($cpu); + my $max=10; + setrlimit($cpu,$max,$hard) or die $! if $soft>$max; + exec @rsargs; + die $!; +} + +while (<$fh>) { + chomp; + if ($qa->{'debug'}) { +%perl> +<% $_ |h %> +<%perl> + } +} + +if ($qa->{'debug'}) { + print "\n"; +} %perl>