From 16795cffb7737de9ef4f29ecbe5fbd20454dcebe Mon Sep 17 00:00:00 2001 From: zephyr Date: Sun, 22 May 2022 12:33:14 +0900 Subject: [PATCH] Revert "set fd limit when starting, up to threshold=65535" This reverts commit 4c4b9ca428383459780c4567ba43a08e7005d7f3. --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/cmd/mod.rs | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index af70a73..9d53e50 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -824,7 +824,7 @@ dependencies = [ [[package]] name = "realm" -version = "2.3.4" +version = "2.3.3" dependencies = [ "cfg-if", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 0e20eb1..fc0fc93 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "realm" -version = "2.3.4" +version = "2.3.3" authors = ["zhboner "] edition = "2021" diff --git a/src/cmd/mod.rs b/src/cmd/mod.rs index 36113be..8879c9b 100644 --- a/src/cmd/mod.rs +++ b/src/cmd/mod.rs @@ -69,10 +69,9 @@ fn handle_matches(matches: ArgMatches) -> CmdInput { #[cfg(all(unix, not(target_os = "android")))] { use realm_syscall::{get_nofile_limit, set_nofile_limit}; - const THRESHOLD: u64 = 65535; let nofile = matches.value_of("nofile").map_or_else( - || get_nofile_limit().map_or(None, |(_, hard)| Some(if hard > THRESHOLD { THRESHOLD } else { hard })), + || get_nofile_limit().map_or(None, |(_, hard)| Some(hard)), |nofile| Some(nofile.parse().unwrap()), );