about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-10-29 10:52:25 -0700
committerbors <bors@rust-lang.org>2013-10-29 10:52:25 -0700
commitfed48cc861fd858762c1e9b498675bfa4dee2d38 (patch)
tree01c61601be0db74a12ff9504f6eace70add85385 /src/libstd/rt
parent52f42f16387d0142944f376ea31c554c9caa2189 (diff)
parent7e77bf17694e31c741fe3a31c7eca5437d9cb6d5 (diff)
downloadrust-fed48cc861fd858762c1e9b498675bfa4dee2d38.tar.gz
rust-fed48cc861fd858762c1e9b498675bfa4dee2d38.zip
auto merge of #10132 : pcwalton/rust/proc, r=pcwalton
the feature gate for `once fn` if used with the `~` sigil.

r? @brson
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/io/native/process.rs16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/libstd/rt/io/native/process.rs b/src/libstd/rt/io/native/process.rs
index 91fff6d9263..0fa454b94d0 100644
--- a/src/libstd/rt/io/native/process.rs
+++ b/src/libstd/rt/io/native/process.rs
@@ -649,23 +649,25 @@ fn waitpid(pid: pid_t) -> int {
 
         unsafe {
 
-            let proc = OpenProcess(SYNCHRONIZE | PROCESS_QUERY_INFORMATION, FALSE, pid as DWORD);
-            if proc.is_null() {
+            let process = OpenProcess(SYNCHRONIZE | PROCESS_QUERY_INFORMATION,
+                                      FALSE,
+                                      pid as DWORD);
+            if process.is_null() {
                 fail!("failure in OpenProcess: {}", os::last_os_error());
             }
 
             loop {
                 let mut status = 0;
-                if GetExitCodeProcess(proc, &mut status) == FALSE {
-                    CloseHandle(proc);
+                if GetExitCodeProcess(process, &mut status) == FALSE {
+                    CloseHandle(process);
                     fail!("failure in GetExitCodeProcess: {}", os::last_os_error());
                 }
                 if status != STILL_ACTIVE {
-                    CloseHandle(proc);
+                    CloseHandle(process);
                     return status as int;
                 }
-                if WaitForSingleObject(proc, INFINITE) == WAIT_FAILED {
-                    CloseHandle(proc);
+                if WaitForSingleObject(process, INFINITE) == WAIT_FAILED {
+                    CloseHandle(process);
                     fail!("failure in WaitForSingleObject: {}", os::last_os_error());
                 }
             }