MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / set_max_ulimit

Function set_max_ulimit

gateway/src/main.rs:73–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71
72#[cfg(unix)]
73fn set_max_ulimit() -> Result<()> {
74 use nix::sys::resource::{getrlimit, setrlimit, Resource};
75 let (soft, hard) = getrlimit(Resource::RLIMIT_NOFILE)?;
76 if soft < hard {
77 setrlimit(Resource::RLIMIT_NOFILE, hard, hard)?;
78 }
79 Ok(())
80}
81
82fn dstack_agent() -> Result<DstackGuestClient<PrpcClient>> {
83 let address = dstack_types::dstack_agent_address();

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected