rust/tests/ui/process/issue-20091.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
508 B
Rust
Raw Normal View History

// run-pass
#![allow(stable_features)]
// ignore-emscripten no processes
2019-04-25 00:26:33 +08:00
// ignore-sgx no processes
2018-07-23 10:14:42 +08:00
#![feature(os)]
#[cfg(unix)]
fn main() {
use std::process::Command;
use std::env;
use std::os::unix::prelude::*;
use std::ffi::OsStr;
if env::args().len() == 1 {
assert!(Command::new(&env::current_exe().unwrap())
.arg(<OsStr as OsStrExt>::from_bytes(b"\xff"))
.status().unwrap().success())
}
}
#[cfg(windows)]
fn main() {}