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