2019-10-29 00:00:00 +00:00
|
|
|
//@ run-pass
|
2018-08-31 13:02:01 +00:00
|
|
|
#![allow(stable_features)]
|
2024-03-06 20:44:54 +00:00
|
|
|
//@ ignore-wasm32 no processes
|
2019-04-24 16:26:33 +00:00
|
|
|
//@ ignore-sgx no processes
|
2017-10-18 01:45:42 +00:00
|
|
|
|
2018-07-23 02:14:42 +00:00
|
|
|
#![feature(os)]
|
2015-03-18 07:57:29 +00:00
|
|
|
|
2015-02-23 18:59:17 +00:00
|
|
|
#[cfg(unix)]
|
2014-12-21 07:21:27 +00:00
|
|
|
fn main() {
|
2015-02-23 18:59:17 +00:00
|
|
|
use std::process::Command;
|
|
|
|
use std::env;
|
|
|
|
use std::os::unix::prelude::*;
|
|
|
|
use std::ffi::OsStr;
|
|
|
|
|
2015-02-16 14:04:02 +00:00
|
|
|
if env::args().len() == 1 {
|
2015-02-23 18:59:17 +00:00
|
|
|
assert!(Command::new(&env::current_exe().unwrap())
|
|
|
|
.arg(<OsStr as OsStrExt>::from_bytes(b"\xff"))
|
2014-12-21 07:21:27 +00:00
|
|
|
.status().unwrap().success())
|
|
|
|
}
|
|
|
|
}
|
2015-02-23 18:59:17 +00:00
|
|
|
|
|
|
|
#[cfg(windows)]
|
|
|
|
fn main() {}
|