I use fexecve(3) on Linux to execute a binary held in a memfd.
Is there an equivalent for macOS? I've tried execve("/dev/fd/%d", [], []), but it failed with EACCES. Copying the file from that path /dev/fd/%d to a new temporary file and exec'ing that does work.
Is there a way to do this without creating the temporary file?