fn with_current_process(&mut self) {
        let process = self.get_or_insert(Process::default());

        let args: Vec<String> = args().collect();

        process.args_count = Some(args.len() as Long);
        process.command_line = Some(args.join(" "));
        process.args = Some(args);

        if let Ok(path) = current_exe() {
            process.executable = Some(path.canonicalize().unwrap().to_string_lossy().into_owned());
        }

        if let Ok(path) = current_dir() {
            process.working_directory =
                Some(path.canonicalize().unwrap().to_string_lossy().into_owned());
        }

        process.pid = Some(process::id() as Long);
    }
/// Fill in with information about the current process.
Fill in with information about the current process.
Fill in with information about the current process .
fn with_current_process(&mut self) {
        let process = self.get_or_insert(Process::default());
        let args: Vec<String> = args().collect();
        process.args_count = Some(args.len() as Long);
        process.command_line = Some(args.join(" "));
        process.args = Some(args);
        if let Ok(path) = current_exe() {
            process.executable = Some(path.canonicalize().unwrap().to_string_lossy().into_owned());
        }
        if let Ok(path) = current_dir() {
            process.working_directory =
                Some(path.canonicalize().unwrap().to_string_lossy().into_owned());
        }
        process.pid = Some(process::id() as Long);
    }
fn with_current_process ( & mut self ) { let process = self . get_or_insert ( Process :: default ( ) ) ; let args : Vec < String > = args ( ) . collect ( ) ; process . args_count = Some ( args . len ( ) as Long ) ; process . command_line = Some ( args . join ( " " ) ) ; process . args = Some ( args ) ; if let Ok ( path ) = current_exe ( ) { process . executable = Some ( path . canonicalize ( ) . unwrap ( ) . to_string_lossy ( ) . into_owned ( ) ) ; } if let Ok ( path ) = current_dir ( ) { process . working_directory = Some ( path . canonicalize ( ) . unwrap ( ) . to_string_lossy ( ) . into_owned ( ) ) ; } process . pid = Some ( process :: id ( ) as Long ) ; }
Fill in with information about the current process.
Fill in with information about the current process .
&mut self
&mut self