Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/libstd/io/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ out.write(bytes!("Hello, world!"));
use container::Container;
use fmt;
use io::{Reader, Writer, io_error, IoError, OtherIoError,
standard_error, EndOfFile, LineBufferedWriter};
standard_error, EndOfFile, LineBufferedWriter, BrokenPipe};
use libc;
use option::{Option, Some, None};
use prelude::drop;
Expand Down Expand Up @@ -353,7 +353,13 @@ impl Writer for StdWriter {
};
match ret {
Ok(()) => {}
Err(e) => io_error::cond.raise(e)
Err(e) => {
// BrokenPipe (EPIPE) occurs when receiving process exits
// with error (i.e., non-zero) status
if e.kind != BrokenPipe {
io_error::cond.raise(e)
}
}
}
}
}
Expand Down