You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would allow us to support Process APIs on iOS. The only unclear part is testing.
It's the recommended and most performant way to spawn processes on Apple targets. The numbers I got for Prefer posix_spawn on OSX #126063 show even up to x100 boost on arm64 and x5 on x64.
We can't take for granted that it would just work on all the platforms. For example in Don't use vfork on android #118085, we had to switch to fork (from vfork) on Android. However, it's worth just asking Copilot to write a prototype and use EgorBot to run some simple benchmarks on Linux x64 and arm64. We should benchmark various scenarios that would include processes that are cheap and expensive to copy . Check https://rust-lang.github.io/rfcs//3228-process-process_group.html for rust approached it.
We still need a fallback to fork/exec to support setguid, setuid and groups:
POSIX_SPAWN_CLOEXEC_DEFAULTsupported byposix_spawn. So it's a must have for Make Process.Start have a option to change handle inheritance #13943.ProcessAPIs on iOS. The only unclear part is testing.x5on x64.fork(fromvfork) on Android. However, it's worth just asking Copilot to write a prototype and use EgorBot to run some simple benchmarks on Linux x64 and arm64. We should benchmark various scenarios that would include processes that are cheap and expensive to copy . Check https://rust-lang.github.io/rfcs//3228-process-process_group.html for rust approached it.setguid,setuidand groups:runtime/src/native/libs/System.Native/pal_process.c
Lines 406 to 414 in d6c493d
cc @jkotas @stephentoub @tmds