On Thu, 3 Oct 2019 at 10:14, Pete Houston <p...@openstrike.co.uk> wrote:
>
> On Wed, Oct 02, 2019 at 06:07:39PM +0100, Steve Hay wrote:
> >
> > I'm not sure about this area, but if it works for with your patch then
> > it's probably an improvement :-)
> >
> > Just out of interest, does the following alternative patch work?
> >
> > Index: lib/Apache2/Resource.pm
> > ===================================================================
> > --- lib/Apache2/Resource.pm     (revision 1866274)
> > +++ lib/Apache2/Resource.pm     (working copy)
> > @@ -115,8 +115,7 @@
> >                    "</tr>");
> >
> >      for my $res (keys %$lim) {
> > -        my $val = eval "&BSD::Resource::${res}()";
> > -        my ($soft, $hard) = getrlimit $val;
> > +        my ($soft, $hard) = getrlimit($lim->{$res});
> >          (my $limit = $res) =~ s/^RLIMIT_//;
> >          ($soft, $hard) = ("$soft " . BM($soft), "$hard ". BM($hard))
> >              if $is_mb{$limit};
>
> Yes, that works just as well for me.
>
> > This avoids making the &BSD::Resource::${res}() calls, which are what
> > is returning undef for you in some cases. Or does this fail just the
> > same because some of the values of %$lim are also undef anyway?
>
> The %$lim values are not undef. See the attached stand-alone test and
> output for the problematic values which I see and which also shows that
> the limits for those resources are still retrievable via getrlimit().
>

Great! Thanks for confirming. I've now committed that fix, and hope to
make the final release soon: I don't think this single change warrants
an RC4.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@perl.apache.org
For additional commands, e-mail: dev-h...@perl.apache.org

Reply via email to