diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-10-22 09:36:30 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-10-24 14:22:35 -0700 |
| commit | 188e471339dfe652b8ff9f3bbe4cc262a040c584 (patch) | |
| tree | d7267619b1909f2deaf319c560a64d667d141d35 /src/libstd/run.rs | |
| parent | d425218395b4a4dd7c6e4f3d680447efd2a3abc6 (diff) | |
| download | rust-188e471339dfe652b8ff9f3bbe4cc262a040c584.tar.gz rust-188e471339dfe652b8ff9f3bbe4cc262a040c584.zip | |
Another round of test fixes and merge conflicts
Diffstat (limited to 'src/libstd/run.rs')
| -rw-r--r-- | src/libstd/run.rs | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/src/libstd/run.rs b/src/libstd/run.rs index 650ef491a3b..615ba60e066 100644 --- a/src/libstd/run.rs +++ b/src/libstd/run.rs @@ -219,16 +219,27 @@ impl Process { let (p, ch) = stream(); let ch = SharedChan::new(ch); let ch_clone = ch.clone(); - do task::spawn_sched(task::SingleThreaded) { - match error.take() { - Some(ref mut e) => ch.send((2, e.read_to_end())), - None => ch.send((2, ~[])) + + // FIXME(#910, #8674): right now I/O is incredibly brittle when it comes + // to linked failure, so these tasks must be spawn so they're not + // affected by linked failure. If these are removed, then the + // runtime may never exit because linked failure will cause some + // SchedHandle structures to not get destroyed, meaning that + // there's always an async watcher available. + do task::spawn_unlinked { + do io::ignore_io_error { + match error.take() { + Some(ref mut e) => ch.send((2, e.read_to_end())), + None => ch.send((2, ~[])) + } } } - do task::spawn_sched(task::SingleThreaded) { - match output.take() { - Some(ref mut e) => ch_clone.send((1, e.read_to_end())), - None => ch_clone.send((1, ~[])) + do task::spawn_unlinked { + do io::ignore_io_error { + match output.take() { + Some(ref mut e) => ch_clone.send((1, e.read_to_end())), + None => ch_clone.send((1, ~[])) + } } } |
