Bug#805141: libbsd-resource-perl: missing constants for the new RLIMIT_* values

Niko Tyni ntyni at debian.org
Sun Nov 15 09:04:46 UTC 2015


Package: libbsd-resource-perl
Version: 1.2908-1
Severity: normal
Tags: upstream
Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=108955

Control: affects -1 libapache2-mod-perl2

The new rlimits like RLIMIT_MSGQUEUE and RLIMIT_NICE don't have exported constants like the old ones, even though they're in the get_rlimits() hash.

% perl -MBSD::Resource -le 'print RLIMIT_CORE'
4

% perl -MBSD::Resource -le 'print RLIMIT_NICE'
RLIMIT_NICE is not a valid BSD::Resource macro at -e line 1.

% perl -MBSD::Resource -le 'print ((get_rlimits())->{RLIMIT_NICE})'
13 

As it happens, this breaks the mod_perl2 test suite (in
t/modules/apache_resource.t), because Apache2::Resource now generates
a fatal warning. From lib/Apache2/Resource.pm in libapache2-mod-perl2
source, status_rlimit() :

    my $lim = get_rlimits();
    [...]
    for my $res (keys %$lim) {
        my $val = eval "&BSD::Resource::${res}()";
        my ($soft, $hard) = getrlimit $val;

AFAICS, this could just use $lim->{$res} to get the same value as
the eval "..." result.
-- 
Niko Tyni   ntyni at debian.org



More information about the pkg-perl-maintainers mailing list