1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

env: adapt to new Process API

This commit is contained in:
Michael Gehring 2014-05-16 12:04:03 +02:00
parent 57affee103
commit 2252b1f28e

5
env/env.rs vendored
View file

@ -191,7 +191,10 @@ fn main() {
} }
if opts.program.len() >= 1 { if opts.program.len() >= 1 {
match std::io::process::Process::status(opts.program.get(0).as_slice(), opts.program.slice_from(1)) { use std::io::process::{Command, InheritFd};
let prog = opts.program.get(0).clone();
let args = opts.program.slice_from(1);
match Command::new(prog).args(args).stdin(InheritFd(0)).stdout(InheritFd(1)).stderr(InheritFd(2)).status() {
Ok(exit) => Ok(exit) =>
std::os::set_exit_status(match exit { std::os::set_exit_status(match exit {
std::io::process::ExitStatus(s) => s, std::io::process::ExitStatus(s) => s,