X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fperl%2FUlimit%2FUlimit.pm;h=8497dfa0452631adcc457ac1f3c8afda844a13b8;hb=f1e59f17c216849d1988d874e7fd945c2cd68e5a;hp=f368555589574c129fc11c834d14e9a3b8b1a328;hpb=483c239d0dca06c73ce9b5a77f4ef766e3771c87;p=libucw.git diff --git a/lib/perl/Ulimit/Ulimit.pm b/lib/perl/Ulimit/Ulimit.pm index f3685555..8497dfa0 100644 --- a/lib/perl/Ulimit/Ulimit.pm +++ b/lib/perl/Ulimit/Ulimit.pm @@ -1,19 +1,32 @@ -package Sherlock::Ulimit; +# Perl module for setting process limits +# +# (c) 2003 Tomas Valla +# +# This software may be freely distributed and used according to the terms +# of the GNU Lesser General Public License. +# +# +# +# Interface: +# UCW::Ulimit::setlimit( $resource, $softlimit, $hardlimit) +# UCW::Ulimit::getlimit( $resource, $softlimit, $hardlimit) +# +# setlimit sets limit to values supplied in softlimit and hardlimit +# getlimit reads limits into softlimit and hardlimit +# $resource constants are defined below +# + +package UCW::Ulimit; use 5.006; use strict; use warnings; -require Exporter; require DynaLoader; -our @ISA = qw(Exporter DynaLoader); +our @ISA = qw(DynaLoader); unshift @DynaLoader::dl_library_path, "lib"; -# Items to export into callers namespace by default. Note: do not export -# names by default without a very good reason. Use EXPORT_OK instead. -# Do not simply export all your public functions/methods/constants. - our $CPU = 0; our $FSIZE = 1; our $DATA = 2; @@ -25,21 +38,9 @@ our $NOFILE = 7; our $MEMLOCK = 8; our $AS = 9; - -# This allows declaration use Ulimit ':all'; -# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK -# will save memory. -our %EXPORT_TAGS = ( 'all' => [ qw( - -) ] ); - -our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); - -our @EXPORT = qw( -); our $VERSION = '0.01'; -bootstrap Sherlock::Ulimit $VERSION; +bootstrap UCW::Ulimit $VERSION; # Preloaded methods go here.