diff options
| author | bors <bors@rust-lang.org> | 2013-10-29 10:52:25 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-10-29 10:52:25 -0700 |
| commit | fed48cc861fd858762c1e9b498675bfa4dee2d38 (patch) | |
| tree | 01c61601be0db74a12ff9504f6eace70add85385 /src/libstd | |
| parent | 52f42f16387d0142944f376ea31c554c9caa2189 (diff) | |
| parent | 7e77bf17694e31c741fe3a31c7eca5437d9cb6d5 (diff) | |
| download | rust-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')
| -rw-r--r-- | src/libstd/rt/io/native/process.rs | 16 | ||||
| -rw-r--r-- | src/libstd/run.rs | 4 |
2 files changed, 11 insertions, 9 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()); } } diff --git a/src/libstd/run.rs b/src/libstd/run.rs index 973e866e335..9e6fdf2ba4c 100644 --- a/src/libstd/run.rs +++ b/src/libstd/run.rs @@ -413,7 +413,7 @@ mod tests { let pipe_out = os::pipe(); let pipe_err = os::pipe(); - let mut proc = run::Process::new("cat", [], run::ProcessOptions { + let mut process = run::Process::new("cat", [], run::ProcessOptions { dir: None, env: None, in_fd: Some(pipe_in.input), @@ -430,7 +430,7 @@ mod tests { } let actual = readclose(pipe_out.input); readclose(pipe_err.input); - proc.finish(); + process.finish(); assert_eq!(~"test", actual); } |
