From 7e77bf17694e31c741fe3a31c7eca5437d9cb6d5 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Mon, 28 Oct 2013 15:22:49 -0700 Subject: librustc: Implement the `proc` type as sugar for `~once fn` and `proc` notation for closures, and disable the feature gate for `once fn` if used with the `~` sigil. --- src/libstd/rt/io/native/process.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/libstd/rt') 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()); } } -- cgit 1.4.1-3-g733a5