]> git.lizzy.rs Git - rust.git/commit
Use posix_spawn_file_actions_addchdir_np when possible
authorJosh Stone <jistone@redhat.com>
Wed, 13 Feb 2019 20:20:23 +0000 (12:20 -0800)
committerJosh Stone <jistone@redhat.com>
Wed, 13 Feb 2019 20:20:23 +0000 (12:20 -0800)
commita301655c8aed20e5cea9a062663820fc29c5e80c
tree9497fbbd2baab5c9ff60c8338d3a8b14bbe65fb7
parent0f949c2fcc696d0260a99196d5e5400c59a26a54
Use posix_spawn_file_actions_addchdir_np when possible

This is a non-POSIX extension implemented in Solaris and in glibc 2.29.
With this we can still use `posix_spawn()` when `Command::current_dir()`
has been set, otherwise we fallback to `fork(); chdir(); exec()`.
src/libstd/sys/unix/process/process_unix.rs