Update process vxworks, set default stack size of 256 Kib for vxworks… · model-checking/verify-rust-std@63d2997 (original) (raw)

File tree

1 file changed

lines changed

1 file changed

lines changed

Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@ use crate::io::{self, ErrorKind};
3 3 use crate::num::NonZero;
4 4 use crate::sys;
5 5 use crate::sys::cvt;
6 +use crate::sys::pal::unix::thread;
6 7 use crate::sys::process::process_common::*;
7 -use crate::sys_common::thread;
8 8 use libc::RTP_ID;
9 9 use libc::{self, c_char, c_int};
10 10
@@ -68,7 +68,12 @@ impl Command {
68 68 .as_ref()
69 69 .map(|c
70 70 .unwrap_or_else(|
71 -let stack_size = thread::min_stack();
71 +let stack_size = crate::cmp::max(
72 +crate::env::var_os("RUST_MIN_STACK")
73 +.and_then(|s
74 +.unwrap_or(thread::DEFAULT_MIN_STACK_SIZE),
75 + libc::PTHREAD_STACK_MIN,
76 +);
72 77
73 78 // ensure that access to the environment is synchronized
74 79 let _lock = sys::os::env_read_lock();