brk_core 0.0.83

The Core (Structs and Errors) of the Bitcoin Research Kit
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::io;

use rlimit::{Resource, getrlimit};

pub fn setrlimit() -> io::Result<()> {
    let no_file_limit = getrlimit(Resource::NOFILE)?;

    rlimit::setrlimit(
        Resource::NOFILE,
        no_file_limit.0.max(10_000),
        no_file_limit.1,
    )?;

    Ok(())
}