posix_spawn_file_actions_addchdir_np is the official way to set the working directory of a spawned process and is supported on both macOS and glibc (Linux, etc.). This makes Process.currentDirectoryURL thread-safe, as the current approach will result in the working directory being nondeterministically assigned when spawning processes across multiple threads, using different working directories.
This already landed in main via #4981 (and amendment in #5090) and it's pretty disruptive for us so I'd like to get it into 6.0.2 if possible.
posix_spawn_file_actions_addchdir_np is the official way to set the working directory of a spawned process and is supported on both macOS and glibc (Linux, etc.). This makes Process.currentDirectoryURL thread-safe, as the current approach will result in the working directory being nondeterministically assigned when spawning processes across multiple threads, using different working directories.
This already landed in main via #4981 (and amendment in #5090) and it's pretty disruptive for us so I'd like to get it into 6.0.2 if possible.