]> mj.ucw.cz Git - libucw.git/blob - lib/perl/Ulimit/Ulimit.pm
Removed trailing whitespaces.
[libucw.git] / lib / perl / Ulimit / Ulimit.pm
1 # Perl module for setting process limits
2 #
3 # (c) 2003 Tomas Valla <tom@ucw.cz>
4 #
5 # This software may be freely distributed and used according to the terms
6 # of the GNU Lesser General Public License.
7 #
8 #
9 #
10 # Interface:
11 #   Sherlock::Ulimit::setlimit( $resource, $softlimit, $hardlimit)
12 #   Sherlock::Ulimit::getlimit( $resource, $softlimit, $hardlimit)
13 #
14 # setlimit sets limit to values supplied in softlimit and hardlimit
15 # getlimit reads limits into softlimit and hardlimit
16 # $resource constants are defined below
17 #
18
19 package Sherlock::Ulimit;
20
21 use 5.006;
22 use strict;
23 use warnings;
24
25 require Exporter;
26 require DynaLoader;
27
28 our @ISA = qw(Exporter DynaLoader);
29 unshift @DynaLoader::dl_library_path, "lib";
30
31 our $CPU = 0;
32 our $FSIZE = 1;
33 our $DATA = 2;
34 our $STACK = 3;
35 our $CORE = 4;
36 our $RSS = 5;
37 our $NPROC = 6;
38 our $NOFILE = 7;
39 our $MEMLOCK = 8;
40 our $AS = 9;
41
42
43 # This allows declaration       use Ulimit ':all';
44 # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
45 # will save memory.
46 our %EXPORT_TAGS = ( 'all' => [ qw(
47
48 ) ] );
49
50 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
51
52 our @EXPORT = qw(
53 );
54 our $VERSION = '0.01';
55
56 bootstrap Sherlock::Ulimit $VERSION;
57
58 # Preloaded methods go here.
59
60 1;
61 __END__