about summary refs log tree commit diff
path: root/src/libstd/sys/windows
diff options
context:
space:
mode:
authorMarc-Antoine Perennou <Marc-Antoine@Perennou.com>2017-02-09 10:11:36 +0100
committerMarc-Antoine Perennou <Marc-Antoine@Perennou.com>2017-02-09 10:11:36 +0100
commitec73ef9dc85b7b1cb986eb7c85fc8093cc668f60 (patch)
tree6485eee90adc1849cce9634efd79ea62f1a34789 /src/libstd/sys/windows
parent4268872807cf8bc5c8c435794d1c82d21899d67b (diff)
parentfd2f8a4536cb9b45abd72b8ff977ad48618602b3 (diff)
downloadrust-ec73ef9dc85b7b1cb986eb7c85fc8093cc668f60.tar.gz
rust-ec73ef9dc85b7b1cb986eb7c85fc8093cc668f60.zip
Merge branch 'master' of git://github.com/rust-lang/rust
* 'master' of git://github.com/rust-lang/rust: (70 commits)
  sanitizer-dylib: only run where std for x86_64-linux is available
  travis: Fix build order of dist-x86-linux
  fix the sanitizer-dylib test on non x86_64 linux hosts
  dist-x86-linux: install newer kernel headers
  enable sanitizers on build job that tests x86_64 linux
  enable sanitizers on x86_64-linux releases
  use helper function in the rebuild logic of the rustc_*san crates
  build/test the sanitizers only when --enable-sanitizers is used
  sanitizer support
  Add missing urls on join_paths
  Add test for #27433
  Add more examples, get everything passing at last.
  Remove some leftover makefiles.
  Add more test for rustdoc --test
  Rename manifest_version to manifest-version
  reference: clarify #[cfg] section
  Bump stable release date
  rustbuild: Clean build/dist on `make clean`
  Add missing urls for current_dir
  review nits
  ...
Diffstat (limited to 'src/libstd/sys/windows')
-rw-r--r--src/libstd/sys/windows/c.rs7
-rw-r--r--src/libstd/sys/windows/process.rs6
2 files changed, 3 insertions, 10 deletions
diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs
index 850d6f49612..e5010ca3564 100644
--- a/src/libstd/sys/windows/c.rs
+++ b/src/libstd/sys/windows/c.rs
@@ -833,13 +833,6 @@ pub struct CONSOLE_READCONSOLE_CONTROL {
 }
 pub type PCONSOLE_READCONSOLE_CONTROL = *mut CONSOLE_READCONSOLE_CONTROL;
 
-#[link(name = "ws2_32")]
-#[link(name = "userenv")]
-#[link(name = "shell32")]
-#[link(name = "advapi32")]
-#[cfg(not(cargobuild))]
-extern {}
-
 extern "system" {
     pub fn WSAStartup(wVersionRequested: WORD,
                       lpWSAData: LPWSADATA) -> c_int;
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)))
         }
     }