/// Kills and removes a child process; returns the configuration
/// used to spawn that process in the first place.
Kills and removes a child process; returns the configuration
used to spawn that process in the first place.
Kills and removes a child process ; returns the configuration used to spawn that process in the first place .
pub fn kill_and_remove(&mut self, pid: &Pid, sig: Signal) -> Option<Cfg> {
        let cfg = self.configs.remove(pid)?;
        let _child = self
            .children
            .write()
            .expect("Couldn't get write lock")
            .remove(pid)?;
        signal_pid(&self.logger, sig, pid);
        Some(cfg)
    }
pub fn kill_and_remove ( & mut self , pid : & Pid , sig : Signal ) -> Option < Cfg > { let cfg = self . configs . remove ( pid ) ? ; let _child = self . children . write ( ) . expect ( " " ) . remove ( pid ) ? ; signal_pid ( & self . logger , sig , pid ) ; Some ( cfg ) }
Kills and removes a child process; returns the configuration
used to spawn that process in the first place.
Kills and removes a child process ; returns the configuration used to spawn that process in the first place .
&mut self
pid
&Pid
sig
Signal