/** * The following 3 methods are used to synchronously spawn the Nuwa process. * The typical usage is: * * The IPC thread The main thread * 1. Receives the request. * 2. NuwaSpawnPrepare(). * 3. Request main thread to * spawn. --------------------------------------+ * 4. NuwaSpawnWait(). V * 5. NuwaSpawn() to clone all * the threads in the Nuwa * process (including main * & IPC threads). * 6. NuwaSpawn() finishes and * +-------------------------------------- signals NuwaSpawnWait(). * V * 7. NuwaSpawnWait() returns. */
/** * Prepare for spawning a new process. The calling thread (typically the IPC * thread) will block furth