pub fn wait(&mut self, options: Option<WaitPidFlag>) -> Result<Status, nix::Error> {
        Ok(match waitpid(self.pid(), options)? {
            WaitStatus::Exited(_pid, exit_code) => {
                self.is_exited = true;
                Status::Exited(exit_code)
            },
            WaitStatus::Signaled(_pid, signal, _core_dumped) => Status::Signaled(signal),
            WaitStatus::Stopped(_pid, signal) => {
                let regs = ptrace::getregs(self.pid())?;
                Status::Stopped(signal, regs.rip as usize)
            }
            other => panic!("waitpid returned unexpected status: {:?}", other),
        })
    }
/// Calls waitpid on this inferior and returns a Status to indicate the state of the process
/// after the waitpid call.
Calls waitpid on this inferior and returns a Status to indicate the state of the process
after the waitpid call.
Calls waitpid on this inferior and returns a Status to indicate the state of the process after the waitpid call .
pub fn wait(&mut self, options: Option<WaitPidFlag>) -> Result<Status, nix::Error> {
        Ok(match waitpid(self.pid(), options)? {
            WaitStatus::Exited(_pid, exit_code) => {
                self.is_exited = true;
                Status::Exited(exit_code)
            },
            WaitStatus::Signaled(_pid, signal, _core_dumped) => Status::Signaled(signal),
            WaitStatus::Stopped(_pid, signal) => {
                let regs = ptrace::getregs(self.pid())?;
                Status::Stopped(signal, regs.rip as usize)
            }
            other => panic!("waitpid returned unexpected status: {:?}", other),
        })
    }
pub fn wait ( & mut self , options : Option < WaitPidFlag > ) -> Result < Status , nix :: Error > { Ok ( match waitpid ( self . pid ( ) , options ) ? { WaitStatus :: Exited ( _pid , exit_code ) => { self . is_exited = true ; Status :: Exited ( exit_code ) } , WaitStatus :: Signaled ( _pid , signal , _core_dumped ) => Status :: Signaled ( signal ) , WaitStatus :: Stopped ( _pid , signal ) => { let regs = ptrace :: getregs ( self . pid ( ) ) ? ; Status :: Stopped ( signal , regs . rip as usize ) } other => panic ! ( " " other ) , } ) }
Calls waitpid on this inferior and returns a Status to indicate the state of the process
after the waitpid call.
Calls waitpid on this inferior and returns a Status to indicate the state of the process after the waitpid call .
&mut self
options
Option<WaitPidFlag>
&mut self
options
Option<WaitPidFlag>