about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-06-16 20:36:41 +0000
committerbors <bors@rust-lang.org>2014-06-16 20:36:41 +0000
commitb755b4db4b30f4ab9fe7ddcbea8ee8d54fd4cd9e (patch)
tree461aa1485216741c6bab0a23ebc340586394d1d7 /src/test
parent0973eb4419d0598c1134106adef2ee8dc2a2b5ff (diff)
parent04eced750e78770e16354c07fddf7ecaaab6ef43 (diff)
downloadrust-b755b4db4b30f4ab9fe7ddcbea8ee8d54fd4cd9e.tar.gz
rust-b755b4db4b30f4ab9fe7ddcbea8ee8d54fd4cd9e.zip
auto merge of #14781 : alexcrichton/rust/issue-14724, r=brson
* os::pipe() now returns `IoResult<os::Pipe>`
* os::pipe() is now unsafe because it does not arrange for deallocation of file
  descriptors
* PipeStream::pair() has been added. This is a safe method to get a pair of
  pipes.
* Dealing with pipes in native process bindings have been improved to be more
  robust in the face of failure and intermittent errors. This converts a few
  fail!() situations to Err situations.

cc #13538
Closes #14724
[breaking-change]
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/sigpipe-should-be-ignored.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/run-pass/sigpipe-should-be-ignored.rs b/src/test/run-pass/sigpipe-should-be-ignored.rs
index 8e2cfa30066..8c68ef173a5 100644
--- a/src/test/run-pass/sigpipe-should-be-ignored.rs
+++ b/src/test/run-pass/sigpipe-should-be-ignored.rs
@@ -16,12 +16,12 @@ use std::io::PipeStream;
 use std::io::Command;
 
 fn test() {
-    let os::Pipe { input, out } = os::pipe();
-    let input = PipeStream::open(input);
-    let mut out = PipeStream::open(out);
-    drop(input);
+    let os::Pipe { reader, writer } = unsafe { os::pipe().unwrap() };
+    let reader = PipeStream::open(reader);
+    let mut writer = PipeStream::open(writer);
+    drop(reader);
 
-    let _ = out.write([1]);
+    let _ = writer.write([1]);
 }
 
 fn main() {