summaryrefslogtreecommitdiff
path: root/src/sys/resource.rs
diff options
context:
space:
mode:
authorRyan Zoeller <rtzoeller@rtzoeller.com>2021-09-19 13:00:09 -0500
committerRyan Zoeller <rtzoeller@rtzoeller.com>2021-09-20 11:53:34 -0500
commit389185e33e6388c5f10182a9f28520245ac091fc (patch)
tree2468ed0f34580daf0497b76a2eea904393832617 /src/sys/resource.rs
parente94bf0e444f4e910d2837d6827809da32e8492c1 (diff)
downloadnix-389185e33e6388c5f10182a9f28520245ac091fc.zip
Lower limits in setrlimit example
The current value causes the doc test to fail on Fedora 34 for unprivileged users.
Diffstat (limited to 'src/sys/resource.rs')
-rw-r--r--src/sys/resource.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sys/resource.rs b/src/sys/resource.rs
index dd7f8c5c..f3bfb671 100644
--- a/src/sys/resource.rs
+++ b/src/sys/resource.rs
@@ -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();
/// ```
///