Skip to content

Commit

Permalink
Auto merge of #100786 - sunshowers:macos-posix-chdir, r=sunshowers
Browse files Browse the repository at this point in the history
Use posix_spawn for absolute paths on macOS

Currently, on macOS, Rust never uses the fast posix_spawn path if a
directory change is requested, due to a bug in Apple's libc. However, the
bug is only triggered if the program is a relative path.

This PR makes it so that the fast path continues to work if the program
is an absolute path or a lone filename.

This was an alternative proposed in rust-lang/rust#80537 (comment), and it makes a measurable performance difference in some of my code that spawns thousands of processes.
  • Loading branch information
bors committed Aug 29, 2022
2 parents 328d1a1 + c625180 commit db13715
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit db13715

Please sign in to comment.