diff options
| author | bors <bors@rust-lang.org> | 2017-02-08 18:11:06 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-02-08 18:11:06 +0000 |
| commit | 4379e2fa08bf31125efa1a9d8bc3c85b16e2c2f3 (patch) | |
| tree | 58de9050e9127eb919f6f11cb93bd951b457b644 /src/libstd/sys/windows | |
| parent | 10f6a5c4431e09d355a0ba319a630e02a1e38361 (diff) | |
| parent | 62d22678d4a7c6a34837137073d8767166d6db1e (diff) | |
| download | rust-4379e2fa08bf31125efa1a9d8bc3c85b16e2c2f3.tar.gz rust-4379e2fa08bf31125efa1a9d8bc3c85b16e2c2f3.zip | |
Auto merge of #39645 - frewsxcv:rollup, r=frewsxcv
Rollup of 11 pull requests - Successful merges: #39462, #39512, #39529, #39557, #39561, #39582, #39583, #39597, #39622, #39624, #39630 - Failed merges:
Diffstat (limited to 'src/libstd/sys/windows')
| -rw-r--r-- | src/libstd/sys/windows/process.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sys/windows/process.rs b/src/libstd/sys/windows/process.rs index d2ad81023e7..1afb3728c9d 100644 --- a/src/libstd/sys/windows/process.rs +++ b/src/libstd/sys/windows/process.rs @@ -340,18 +340,18 @@ impl Process { } } - pub fn try_wait(&mut self) -> io::Result<ExitStatus> { + pub fn try_wait(&mut self) -> io::Result<Option<ExitStatus>> { unsafe { match c::WaitForSingleObject(self.handle.raw(), 0) { c::WAIT_OBJECT_0 => {} c::WAIT_TIMEOUT => { - return Err(io::Error::from_raw_os_error(c::WSAEWOULDBLOCK)) + return Ok(None); } _ => return Err(io::Error::last_os_error()), } let mut status = 0; cvt(c::GetExitCodeProcess(self.handle.raw(), &mut status))?; - Ok(ExitStatus(status)) + Ok(Some(ExitStatus(status))) } } |
