Skip to main content

CommandOpenFileLimitExt

Trait CommandOpenFileLimitExt 

Source
pub trait CommandOpenFileLimitExt {
    // Required method
    fn set_open_file_limit(&mut self, limit: u64) -> Result<(), Error>;
}
Available on Unix only.
Expand description

Extension trait for setting a command’s open-file limit before it runs.

Required Methods§

Source

fn set_open_file_limit(&mut self, limit: u64) -> Result<(), Error>

Arranges for the command to set its soft RLIMIT_NOFILE to limit, or to its hard limit if that is lower, after it is forked and before it runs its program.

§Errors

None here: a child that cannot set the limit fails its spawn.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl CommandOpenFileLimitExt for Command

Source§

fn set_open_file_limit(&mut self, limit: u64) -> Result<(), Error>

Implementors§