Block pipe writes when the buffer grows too large
Created by: xTibor
It looks like the growth of the pipe buffers currently unbounded. This can cause problems when a pipe is written faster than the other end reads it.
For example for following test app produces an out of frames panic within seconds:
use std::process::{Command, Stdio};
use std::thread;
fn main() {
let child = Command::new("cat")
.args(&["zero:/"])
.stdout(Stdio::piped())
.spawn()
.expect("failed to execute child");
loop {
thread::yield_now();
}
}
Edited by Jacob Lorentzon