mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-04 15:53:40 -07:00
global: snapshot
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
mod pause;
|
||||
mod rlimit;
|
||||
|
||||
pub use pause::*;
|
||||
pub use rlimit::*;
|
||||
@@ -0,0 +1,7 @@
|
||||
use log::info;
|
||||
|
||||
pub fn pause() {
|
||||
info!("Press enter to continue...");
|
||||
let mut buffer = String::new();
|
||||
std::io::stdin().read_line(&mut buffer).expect("Failed to read line");
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
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(210_000), no_file_limit.1)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user