]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/process/issue-14456.rs
3 // ignore-emscripten no processes
4 // ignore-sgx no processes
7 use std
::io
::prelude
::*;
9 use std
::process
::{Command, Stdio}
;
12 let args
: Vec
<String
> = env
::args().collect();
13 if args
.len() > 1 && args
[1] == "child" {
21 writeln
!(&mut io
::stdout(), "foo").unwrap();
22 writeln
!(&mut io
::stderr(), "bar").unwrap();
23 let mut stdin
= io
::stdin();
24 let mut s
= String
::new();
25 stdin
.lock().read_line(&mut s
).unwrap();
26 assert_eq
!(s
.len(), 0);
30 let args
: Vec
<String
> = env
::args().collect();
31 let mut p
= Command
::new(&args
[0]).arg("child")
32 .stdin(Stdio
::piped())
33 .stdout(Stdio
::piped())
34 .stderr(Stdio
::piped())
36 assert
!(p
.wait().unwrap().success());