about summary refs log tree commit diff
path: root/tests/ui/process/issue-14940.rs
blob: cfbc743250fdea7c9b6a08edb639b26c490ccebb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//@ run-pass
//@ needs-subprocess

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());
    }
}