pub enum CloneResult {
Parent {
child_pid: Pid,
child_pidfd: Option<PidFd>,
},
Child,
}Expand description
Résultat de clone3.
Distingue sans ambiguïté le côté parent (avec le PID enfant et,
optionnellement, un pidfd) du côté enfant (qui n’a rien d’autre à
connaître que sa propre identité, accessible via getpid/gettid).
Variants§
Parent
Retour côté parent.
Fields
§
child_pidfd: Option<PidFd>PidFd si CloneFlags::PIDFD était positionné, None sinon.
Child
Retour côté enfant.
L’enfant doit typiquement exécuter ses traitements puis terminer
(exit_group, ou — dans les tests Air — std::process::exit qui
flush les compteurs LLVM de couverture). Voir le pattern recommandé
dans la spec.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CloneResult
impl RefUnwindSafe for CloneResult
impl Send for CloneResult
impl Sync for CloneResult
impl Unpin for CloneResult
impl UnsafeUnpin for CloneResult
impl UnwindSafe for CloneResult
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