about summary refs log tree commit diff
path: root/src/libstd/sys/windows
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-02-08 18:11:06 +0000
committerbors <bors@rust-lang.org>2017-02-08 18:11:06 +0000
commit4379e2fa08bf31125efa1a9d8bc3c85b16e2c2f3 (patch)
tree58de9050e9127eb919f6f11cb93bd951b457b644 /src/libstd/sys/windows
parent10f6a5c4431e09d355a0ba319a630e02a1e38361 (diff)
parent62d22678d4a7c6a34837137073d8767166d6db1e (diff)
downloadrust-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.rs6
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)))
         }
     }