How can I start a sub-process in Windows?
There is no direct equivalent of fork()
on Windows.
CreateProcess()
is the native function that can be used to create a new process (but, again, the semantics are rather different to fork()
's).
To put this another way, on Unix it is possible for a process to cheaply create a clone of itself. There is no inexpensive way to do this on Windows.
If you don't care about the cloning aspect of fork()
, then CreateProcess()
should do just fine.