Compare commits
No commits in common. "8c2b6724dab918f8815d90b4cd12d8e49bac4d9c" and "f6faf029cde9e179cd66dd354c562593ec247a93" have entirely different histories.
8c2b6724da
...
f6faf029cd
1 changed files with 8 additions and 14 deletions
|
@ -812,19 +812,13 @@ pub fn command(stack: &mut Stack) -> OError {
|
|||
if args.is_empty() {
|
||||
return stack.err(ErrorKind::InvalidCall("command".to_owned()));
|
||||
}
|
||||
stack.push(
|
||||
Value::Long(
|
||||
process::Command::new(&args[0])
|
||||
.args(&args[1..])
|
||||
.stdin(Stdio::null())
|
||||
.stdout(Stdio::null())
|
||||
.stderr(Stdio::null())
|
||||
.stdin(Stdio::inherit())
|
||||
.stdout(Stdio::inherit())
|
||||
.stderr(Stdio::inherit())
|
||||
.spawn()
|
||||
.map_err(|x| stack.error(ErrorKind::IO(x.to_string())))?
|
||||
.id() as i64,
|
||||
)
|
||||
.spl(),
|
||||
);
|
||||
.map_err(|x| stack.error(ErrorKind::IO(x.to_string())))?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -1201,7 +1195,7 @@ pub fn register(r: &mut Stack, o: Arc<Frame>) {
|
|||
("alit-end", alit_end, 1),
|
||||
("import", import, 0),
|
||||
("readln", readln, 1),
|
||||
("command", command, 1),
|
||||
("command", command, 0),
|
||||
("command-wait", command_wait, 1),
|
||||
("str-to-bytes", str_to_bytes, 1),
|
||||
("bytes-to-str", bytes_to_str, 1),
|
||||
|
|
Loading…
Add table
Reference in a new issue