NAME
Linux::Perl::prlimit
SYNOPSIS
my ($soft, $hard) = Linux::Perl::prlimit->get(
0,
Linux::Perl::prlimit::NUMBER()->{'NPROC'}
);
my ($old_soft, $old_hard) = Linux::Perl::prlimit->get(
0,
Linux::Perl::prlimit::NUMBER()->{'NPROC'},
$new_soft,
$new_hard,
);
DESCRIPTION
This module provides access to Linux’s facility for getting and setting an arbitrary process’s rlimits.
CONSTANTS
INFINITY
Equivalent to the kernel’s RLIM_INFINITY constant.
NAMES
A list of resource names, e.g., CPU
. (cf. man 2 prlimit
)
NUMBER
A reference to a hash that correlates resource name (e.g., FSIZE
) to number.
METHODS
($soft, $hard) = CLASS->get( $PID, $RESOURCE_NUM )
Fetches an individual resource limit. Must be called in list context.
($old_soft, $old_hard) = CLASS->set( $PID, $RESOURCE_NUM, $SOFT, $HARD )
Sets an individual resource limit. If called in list context will return the old soft/hard limits. Must not be called in scalar context.