Skip to content

Commit

Permalink
Merge #1536
Browse files Browse the repository at this point in the history
1536: Lower limits in setrlimit example r=asomers a=rtzoeller

The current values causes the doc test to fail on Fedora 34 for unprivileged users. The values can be lowered without meaningfully changing the example.

Previously the example failed with EPERM.

Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
  • Loading branch information
bors[bot] and rtzoeller committed Sep 28, 2021
2 parents af01302 + 389185e commit 759b34a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sys/resource.rs
Expand Up @@ -200,8 +200,8 @@ pub fn getrlimit(resource: Resource) -> Result<(Option<rlim_t>, Option<rlim_t>)>
/// ```
/// # use nix::sys::resource::{setrlimit, Resource};
///
/// let soft_limit = Some(1024);
/// let hard_limit = Some(1048576);
/// let soft_limit = Some(512);
/// let hard_limit = Some(1024);
/// setrlimit(Resource::RLIMIT_NOFILE, soft_limit, hard_limit).unwrap();
/// ```
///
Expand Down

0 comments on commit 759b34a

Please sign in to comment.