mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 21:16:44 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			432 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			432 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ 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());
 | |
|     }
 | |
| }
 | 
