Skip to content

Commit 759b34a

Browse files
bors[bot]rtzoeller
andauthored
Merge #1536
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>
2 parents af01302 + 389185e commit 759b34a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sys/resource.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ pub fn getrlimit(resource: Resource) -> Result<(Option<rlim_t>, Option<rlim_t>)>
200200
/// ```
201201
/// # use nix::sys::resource::{setrlimit, Resource};
202202
///
203-
/// let soft_limit = Some(1024);
204-
/// let hard_limit = Some(1048576);
203+
/// let soft_limit = Some(512);
204+
/// let hard_limit = Some(1024);
205205
/// setrlimit(Resource::RLIMIT_NOFILE, soft_limit, hard_limit).unwrap();
206206
/// ```
207207
///

0 commit comments

Comments
 (0)