feat: raise open file descriptors limit at startup

This commit is contained in:
sxyazi 2023-11-06 08:28:33 +08:00
parent 1f744810f4
commit f5db7d993f
No known key found for this signature in database
3 changed files with 12 additions and 0 deletions

10
Cargo.lock generated
View file

@ -578,6 +578,15 @@ dependencies = [
"simd-adler32",
]
[[package]]
name = "fdlimit"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c4c9e43643f5a3be4ca5b67d26b98031ff9db6806c3440ae32e02e3ceac3f1b"
dependencies = [
"libc",
]
[[package]]
name = "filetime"
version = "0.2.22"
@ -2517,6 +2526,7 @@ dependencies = [
"ansi-to-tui",
"anyhow",
"crossterm",
"fdlimit",
"futures",
"libc",
"ratatui",

View file

@ -19,6 +19,7 @@ yazi-shared = { path = "../yazi-shared", version = "0.1.5" }
ansi-to-tui = "^3"
anyhow = "^1"
crossterm = { version = "^0", features = [ "event-stream" ] }
fdlimit = "^0"
futures = "^0"
ratatui = "^0"
tokio = { version = "^1", features = [ "parking_lot" ] }

View file

@ -20,6 +20,7 @@ use signals::*;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let _ = fdlimit::raise_fd_limit();
// console_subscriber::init();
yazi_config::init();