Enum pty_shell::tty::Fork
[−]
[src]
pub enum Fork { Parent(i32, Master), Child(Slave), }
Variants
Parent(i32, Master)
Child(Slave)
Methods
impl Fork
[src]
fn new(path: &'static str) -> Result<Fork, ForkError>
The constructor function new
forks the program
and returns the current pid.
fn from_ptmx() -> Result<Fork, ForkError>
The constructor function from_ptmx
forks the program
and returns the current pid for a default PTMX's path.
fn wait(&self) -> Result<i32, ForkError>
Waits until it's terminated.
fn is_parent(&self) -> Result<Master, ForkError>
The function is_parent
returns the pid or parent
or none.
fn is_child(&self) -> Result<&Slave, ForkError>
The function is_child
returns the pid or child
or none.
Trait Implementations
impl Drop for Fork
[src]
fn drop(&mut self)
impl Debug for Fork
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.