rust/src/test
Alex Crichton f09592a5d1 io: Implement process wait timeouts
This implements set_timeout() for std::io::Process which will affect wait()
operations on the process. This follows the same pattern as the rest of the
timeouts emerging in std::io::net.

The implementation was super easy for everything except libnative on unix
(backwards from usual!), which required a good bit of signal handling. There's a
doc comment explaining the strategy in libnative. Internally, this also required
refactoring the "helper thread" implementation used by libnative to allow for an
extra helper thread (not just the timer).

This is a breaking change in terms of the io::Process API. It is now possible
for wait() to fail, and subsequently wait_with_output(). These two functions now
return IoResult<T> due to the fact that they can time out.

Additionally, the wait_with_output() function has moved from taking `&mut self`
to taking `self`. If a timeout occurs while waiting with output, the semantics
are undesirable in almost all cases if attempting to re-wait on the process.
Equivalent functionality can still be achieved by dealing with the output
handles manually.

[breaking-change]

cc #13523
2014-05-13 17:27:42 -07:00
..
auxiliary Allow blocks in const expressions 2014-05-13 17:24:07 -07:00
bench Touch up and rebase previous commits 2014-05-13 17:24:08 -07:00
codegen
compile-fail Touch up and rebase previous commits 2014-05-13 17:24:08 -07:00
compile-fail-fulldeps
debuginfo core: Remove the cast module 2014-05-11 01:13:02 -07:00
pretty librustc: Remove ~EXPR, ~TYPE, and ~PAT from the language, except 2014-05-06 23:12:54 -07:00
run-fail compiletest: Test --pretty expanded 2014-05-13 17:24:08 -07:00
run-make Add the patch number to version strings. Closes #13289 2014-05-12 19:52:29 -07:00
run-pass io: Implement process wait timeouts 2014-05-13 17:27:42 -07:00
run-pass-fulldeps compiletest: Test --pretty expanded 2014-05-13 17:24:08 -07:00