Enum nix::unistd::ForkResult [−][src]
pub enum ForkResult { Parent { child: Pid, }, Child, }
Represents the successful result of calling fork
When fork
is called, the process continues execution in the parent process
and in the new child. This return type can be examined to determine whether
you are now executing in the parent process or in the child.
Variants
Parent
Fields of Parent
child: Pid |
Child
Methods
impl ForkResult
[src]
impl ForkResult
pub fn is_child(&self) -> bool
[src]
pub fn is_child(&self) -> bool
Return true
if this is the child process of the fork()
pub fn is_parent(&self) -> bool
[src]
pub fn is_parent(&self) -> bool
Returns true
if this is the parent process of the fork()
Trait Implementations
impl Clone for ForkResult
[src]
impl Clone for ForkResult
fn clone(&self) -> ForkResult
[src]
fn clone(&self) -> ForkResult
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for ForkResult
[src]
impl Copy for ForkResult
Auto Trait Implementations
impl Send for ForkResult
impl Send for ForkResult
impl Sync for ForkResult
impl Sync for ForkResult