diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-12-19 11:29:39 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-12-30 14:33:59 -0800 |
| commit | 9e224c2bf18ebf8f871efb2e1aba43ed7970ebb7 (patch) | |
| tree | da18d5791e6841a1aa6a9469baca155d4ca9828d /src/libstd/sys/windows/process.rs | |
| parent | d2368c3c11ddab9d812c4ddec2e44579326ad347 (diff) | |
| download | rust-9e224c2bf18ebf8f871efb2e1aba43ed7970ebb7.tar.gz rust-9e224c2bf18ebf8f871efb2e1aba43ed7970ebb7.zip | |
std: Re-enable at_exit()
The new semantics of this function are that the callbacks are run when the *main thread* exits, not when all threads have exited. This implies that other threads may still be running when the `at_exit` callbacks are invoked and users need to be prepared for this situation. Users in the standard library have been audited in accordance to these new rules as well. Closes #20012
Diffstat (limited to 'src/libstd/sys/windows/process.rs')
| -rw-r--r-- | src/libstd/sys/windows/process.rs | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/libstd/sys/windows/process.rs b/src/libstd/sys/windows/process.rs index 0c2c76077dd..0c5a0eb6bb9 100644 --- a/src/libstd/sys/windows/process.rs +++ b/src/libstd/sys/windows/process.rs @@ -8,25 +8,24 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use libc::{pid_t, c_void, c_int}; +use prelude::*; + +use libc::{pid_t, c_void}; use libc; use c_str::CString; use io; use mem; use os; use ptr; -use prelude::*; -use io::process::{ProcessExit, ExitStatus, ExitSignal}; +use io::process::{ProcessExit, ExitStatus}; use collections; use path::BytesContainer; use hash::Hash; use io::{IoResult, IoError}; -use sys::fs; -use sys::{mod, retry, c, wouldblock, set_nonblocking, ms_to_timeval, timer}; +use sys::timer; use sys::fs::FileDesc; -use sys_common::helper_thread::Helper; -use sys_common::{AsInner, mkerr_libc, timeout}; +use sys_common::{AsInner, timeout}; use io::fs::PathExtensions; @@ -121,8 +120,6 @@ impl Process { use libc::funcs::extra::msvcrt::get_osfhandle; use mem; - use iter::{Iterator, IteratorExt}; - use str::StrExt; if cfg.gid().is_some() || cfg.uid().is_some() { return Err(IoError { |
