dont inherit stdio in command function

This commit is contained in:
Daniella / Tove 2024-11-22 13:07:34 +01:00
parent e55a619862
commit 8c2b6724da
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -816,9 +816,9 @@ pub fn command(stack: &mut Stack) -> OError {
Value::Long( Value::Long(
process::Command::new(&args[0]) process::Command::new(&args[0])
.args(&args[1..]) .args(&args[1..])
.stdin(Stdio::inherit()) .stdin(Stdio::null())
.stdout(Stdio::inherit()) .stdout(Stdio::null())
.stderr(Stdio::inherit()) .stderr(Stdio::null())
.spawn() .spawn()
.map_err(|x| stack.error(ErrorKind::IO(x.to_string())))? .map_err(|x| stack.error(ErrorKind::IO(x.to_string())))?
.id() as i64, .id() as i64,