pub enum SpawnFdPolicy {
CloexecOnly,
CloseFrom3,
Allowlist(Vec<RawFd>),
}Expand description
Explicit file-descriptor inheritance policy for spawned children.
Variants§
CloexecOnly
Inherit descriptors according to their existing FD_CLOEXEC flags.
CloseFrom3
For the fork backend, close every descriptor >= 3 before execve,
except Core-required pipe descriptors.
Allowlist(Vec<RawFd>)
For the fork backend, close every descriptor >= 3 before execve,
except Core-required pipe descriptors and the listed descriptors.
Core does not close allowlisted descriptors, but their existing
FD_CLOEXEC state still applies. Callers that want an allowlisted
descriptor to survive execve must clear FD_CLOEXEC before spawning.
Trait Implementations§
Source§impl Clone for SpawnFdPolicy
impl Clone for SpawnFdPolicy
Source§fn clone(&self) -> SpawnFdPolicy
fn clone(&self) -> SpawnFdPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SpawnFdPolicy
impl Debug for SpawnFdPolicy
Source§impl Default for SpawnFdPolicy
impl Default for SpawnFdPolicy
Source§fn default() -> SpawnFdPolicy
fn default() -> SpawnFdPolicy
Returns the “default value” for a type. Read more
impl Eq for SpawnFdPolicy
Source§impl PartialEq for SpawnFdPolicy
impl PartialEq for SpawnFdPolicy
Source§fn eq(&self, other: &SpawnFdPolicy) -> bool
fn eq(&self, other: &SpawnFdPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SpawnFdPolicy
Auto Trait Implementations§
impl Freeze for SpawnFdPolicy
impl RefUnwindSafe for SpawnFdPolicy
impl Send for SpawnFdPolicy
impl Sync for SpawnFdPolicy
impl Unpin for SpawnFdPolicy
impl UnsafeUnpin for SpawnFdPolicy
impl UnwindSafe for SpawnFdPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more