-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
9f7caed
commit f09592a
Showing
23 changed files
with
876 additions
and
326 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
f09592a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from alexcrichton
at alexcrichton@f09592a
f09592a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging alexcrichton/rust/rollup = f09592a into auto
f09592a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alexcrichton/rust/rollup = f09592a merged ok, testing candidate = f87ff617
f09592a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some tests failed:
failure: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/4952
exception: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/5758
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/5757
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/4860
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/5856
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/4944
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/5858
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/4949
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/2745
exception: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/5851
exception: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/4962
f09592a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from alexcrichton
at alexcrichton@f09592a
f09592a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging alexcrichton/rust/rollup = f09592a into auto
f09592a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alexcrichton/rust/rollup = f09592a merged ok, testing candidate = b2b383c
f09592a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/5759
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/5758
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/4853
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/4861
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/5857
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/4945
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/4953
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/5859
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/4944
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/4950
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/5012
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/2746
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/5852
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/4948
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/4963
f09592a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = b2b383c