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

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

20 lines
470 B
Rust
Raw Normal View History

//@ run-pass
//@ ignore-wasm32 no processes
2019-04-24 16:26:33 +00:00
//@ ignore-sgx no processes
use std::env;
use std::process::Command;
use std::io::{self, Write};
fn main() {
let mut args = env::args();
if args.len() > 1 {
let mut out = io::stdout();
out.write(&['a' as u8; 128 * 1024]).unwrap();
} else {
let out = Command::new(&args.next().unwrap()).arg("child").output();
let out = out.unwrap();
assert!(out.status.success());
}
}