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:
parent
57affee103
commit
2252b1f28e
1 changed files with 4 additions and 1 deletions
5
env/env.rs
vendored
5
env/env.rs
vendored
|
@ -191,7 +191,10 @@ fn main() {
|
|||
}
|
||||
|
||||
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) =>
|
||||
std::os::set_exit_status(match exit {
|
||||
std::io::process::ExitStatus(s) => s,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue