about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-02-04 09:59:47 -0800
committerAlex Crichton <alex@alexcrichton.com>2016-02-10 09:28:48 -0800
commit18f9a79c23da8e8920e4c944656b9945f3544337 (patch)
tree9d2095b06d861c8b8f4764d5e6f025066ada8003 /src/libstd/sys/unix/stack_overflow.rs
parentb8bd8f3d7c9c8a3187d6c80ab201f66dedee457c (diff)
downloadrust-18f9a79c23da8e8920e4c944656b9945f3544337.tar.gz
rust-18f9a79c23da8e8920e4c944656b9945f3544337.zip
std: Lift out Windows' CreateProcess lock a bit
The function `CreateProcess` is not itself unsafe to call from many threads, the
article in question is pointing out that handles can be inherited by unintended
child processes. This is basically the same race as the standard Unix
open-then-set-cloexec race.

Since the intention of the lock is to protect children from inheriting
unintended handles, the lock is now lifted out to before the creation of the
child I/O handles (which will all be inheritable). This will ensure that we only
have one process in Rust at least creating inheritable handles at a time,
preventing unintended inheritance to children.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions