about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-05-27 12:08:27 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-05-27 17:49:31 -0700
commit034eb4e724bf138bd2d90268cd0e759f99f0d396 (patch)
tree5941c72b81bc4a09adcf0173d5d6a9c1b9895b5b /src/rustllvm/RustWrapper.cpp
parent746d086f9322d24fa7b389dd911e204ca35012ae (diff)
downloadrust-034eb4e724bf138bd2d90268cd0e759f99f0d396.tar.gz
rust-034eb4e724bf138bd2d90268cd0e759f99f0d396.zip
native: Ignore stdio fds with /dev/null
When spawning a process, stdio file descriptors can be configured to be ignored,
which basically means that they'll be closed. Currently this is done by
literally closing the file descriptors in the child, but this can have adverse
side effects if the child process then opens a new file descriptor, assigning it
to a stdio number.

To work around the problems of the child, this commit alters the process
spawning code to map stdio fds to /dev/null on unix (and a similar equivalent on
windows) when they are specified as being ignored. This should allow spawned
programs to have more expected behavior when opening new files.

Closes #14456
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions