Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1:kernel-2.6.32
perl-BSD-Resource
perl-BSD-Resource-1.2901-getrlimit.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-BSD-Resource-1.2901-getrlimit.diff of Package perl-BSD-Resource
--- Resource.pm +++ Resource.pm @@ -573,12 +573,16 @@ if (wantarray) { return @rlimit; } else { - return $rlimit[0]; + my $rlim = {}; + $rlim->{'cur'} = shift(@rlimit); + $rlim->{'max'} = shift(@rlimit); + bless $rlim; + return $rlim; } } -sub soft { _g($_[0], 'soft') } -sub hard { _g($_[0], 'hard') } +sub cur { _g($_[0], 'cur') } +sub max { _g($_[0], 'max') } sub get_rlimits () { _get_rlimits(); --- t/setrlimit.t +++ t/setrlimit.t @@ -30,7 +30,7 @@ my $success = setrlimit($lim, $try_soft, $try_hard); if ($success) { print "# setrlimit($lim, $try_soft) = OK\n"; - my $new_soft = getrlimit($lim); + my $new_soft = getrlimit($lim)->cur; print "# getrlimit($lim) = $new_soft\n"; if (($new_soft > 0 || $old_soft == 0) && $new_soft <= $try_soft) { print "ok $test_no # $try_soft <= $new_soft\n";
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor