pub fn add_cmd_to_job(
        &mut self, 
        id: i32, 
        pid: Pid, 
        pgid: Pid, 
        cmd: String,
        bg: bool,
    ) {
        if let Some(job) = self.jobs.get_mut(&id) {
            job.pids.push(pid);
            return;
        } else {
            self.jobs.insert(id, JobTrack {
                firstcmd: cmd,
                id: id,
                pgid: pgid,
                pids: vec![pid],
                status: JobStatus::Running,
                background: bg,
            });
        }
    }
/// Adds a job to the shell to track.
/// Normally only used for background jobs.
Adds a job to the shell to track.
Normally only used for background jobs.
Adds a job to the shell to track . Normally only used for background jobs .
pub fn add_cmd_to_job(
        &mut self, 
        id: i32, 
        pid: Pid, 
        pgid: Pid, 
        cmd: String,
        bg: bool,
    ) {
        if let Some(job) = self.jobs.get_mut(&id) {
            job.pids.push(pid);
            return;
        } else {
            self.jobs.insert(id, JobTrack {
                firstcmd: cmd,
                id: id,
                pgid: pgid,
                pids: vec![pid],
                status: JobStatus::Running,
                background: bg,
            });
        }
    }
pub fn add_cmd_to_job ( & mut self , id : i32 , pid : Pid , pgid : Pid , cmd : String , bg : bool , ) { if let Some ( job ) = self . jobs . get_mut ( & id ) { job . pids . push ( pid ) ; return ; } else { self . jobs . insert ( id , JobTrack { firstcmd : cmd , id : id , pgid : pgid , pids : vec ! [ pid ] , status : JobStatus :: Running , background : bg , } ) ; } }
Adds a job to the shell to track.
Adds a job to the shell to track .
&mut self
id
i32
pid
Pid
pgid
Pid
cmd
String
bg
bool