No. I mean, it’ll probably work, but it’s relying on implementation details that could change.
In a way it feels even safer to fork in pure Swift app's main.swift file so long as this is done as the very first thing.
In C++ app globals' constructors could create threads, mutexes, call malloc and whatnot before (and during) the app hitting main().
I encourage you to run a performance test
Indeed fork is not faster than posix_spawn, each took about 120 µs in a simple app.
(I forked/spawned 1000 processes for accuracy).
Topic:
Code Signing
SubTopic:
General
Tags: