fn command_result(machine: &mut MachineState, command: std::io::Result<process::ExitStatus>) {
            match command {
                Ok(status) => {
                    match status.code() {
                        Some(code) => {
                            let code = integer_as_cell!(Number::arena_from(code, &mut machine.arena));
                            unify!(machine, code, machine.registers[2]);
                        }
                        _ => {
                            machine.fail = true;
                        }
                    }
                }
                _ => {
                    machine.fail = true;
                }
            }
        }
// shell executes a command in a system shell
// the code looks for a SHELL env var to do it in a UNIX-style
// if not found, the code looks for COMSPEC env var to do it in a DOS-style
// the output is printed directly to stdout
// the output status code is returned after finishing
shell executes a command in a system shell
the code looks for a SHELL env var to do it in a UNIX-style
if not found, the code looks for COMSPEC env var to do it in a DOS-style
the output is printed directly to stdout
the output status code is returned after finishing
shell executes a command in a system shell the code looks for a SHELL env var to do it in a UNIX - style if not found the code looks for COMSPEC env var to do it in a DOS - style the output is printed directly to stdout the output status code is returned after finishing
fn command_result(machine: &mut MachineState, command: std::io::Result<process::ExitStatus>) {
            match command {
                Ok(status) => {
                    match status.code() {
                        Some(code) => {
                            let code = integer_as_cell!(Number::arena_from(code, &mut machine.arena));
                            unify!(machine, code, machine.registers[2]);
                        }
                        _ => {
                            machine.fail = true;
                        }
                    }
                }
                _ => {
                    machine.fail = true;
                }
            }
        }
fn command_result ( machine : & mut MachineState , command : std :: io :: Result < process :: ExitStatus > ) { match command { Ok ( status ) => { match status . code ( ) { Some ( code ) => { let code = integer_as_cell ! ( Number arena_from ( code mut machine arena ) ) ; unify ! ( machine code machine registers [ 2 ] ) ; } _ => { machine . fail = true ; } } } _ => { machine . fail = true ; } } }
shell executes a command in a system shell
the code looks for a SHELL env var to do it in a UNIX-style
if not found, the code looks for COMSPEC env var to do it in a DOS-style
the output is printed directly to stdout
the output status code is returned after finishing
shell executes a command in a system shell the code looks for a SHELL env var to do it in a UNIX - style if not found the code looks for COMSPEC env var to do it in a DOS - style the output is printed directly to stdout the output status code is returned after finishing
machine
&mut MachineState
command
std::io::Result<process::ExitStatus>
machine
&mut MachineState
command
std::io::Result<process::ExitStatus>