diff options
| author | bors <bors@rust-lang.org> | 2015-07-21 20:51:04 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-07-21 20:51:04 +0000 |
| commit | ee2d3bc8a20545aa6bb660ae0e30ff143f160d16 (patch) | |
| tree | 11f8943dddf55f253b0247d09d8447826d083595 /src/libstd/rt/mod.rs | |
| parent | 21dfd24c4b1f8c24abb78d573c42344b8d2ec809 (diff) | |
| parent | d68b152c3e2feb6ee18bdf2c992098376dbb528c (diff) | |
| download | rust-ee2d3bc8a20545aa6bb660ae0e30ff143f160d16.tar.gz rust-ee2d3bc8a20545aa6bb660ae0e30ff143f160d16.zip | |
Auto merge of #27073 - alexcrichton:less-proc-fs, r=brson
This can fail on linux for various reasons, such as the /proc filesystem not being mounted. There are already many cases where we can't set up stack guards, so just don't worry about this case and communicate that no guard was enabled. I've confirmed that this allows the compiler to run in a chroot without /proc mounted. Closes #22642
Diffstat (limited to 'src/libstd/rt/mod.rs')
| -rw-r--r-- | src/libstd/rt/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs index 1729d20da20..0ac0d03e19d 100644 --- a/src/libstd/rt/mod.rs +++ b/src/libstd/rt/mod.rs @@ -96,7 +96,7 @@ fn lang_start(main: *const u8, argc: isize, argv: *const *const u8) -> isize { // own fault handlers if we hit it. sys_common::stack::record_os_managed_stack_bounds(my_stack_bottom, my_stack_top); - sys::thread::guard::init(); + let main_guard = sys::thread::guard::init(); sys::stack_overflow::init(); // Next, set up the current Thread with the guard information we just @@ -104,7 +104,7 @@ fn lang_start(main: *const u8, argc: isize, argv: *const *const u8) -> isize { // but we just do this to name the main thread and to give it correct // info about the stack bounds. let thread: Thread = NewThread::new(Some("<main>".to_string())); - thread_info::set(sys::thread::guard::main(), thread); + thread_info::set(main_guard, thread); // By default, some platforms will send a *signal* when a EPIPE error // would otherwise be delivered. This runtime doesn't install a SIGPIPE |
