I'm not so sure about the Windows way; I can work out roughly how to at least start a process in Windows. As for the UNIX way, I'm sure about that although it may not be the best.
As you can see, the Linux/UNIX way is infinitely better takes less setting up and less lines of code. The windows example (which, admittedly, is an awful example) just starts the program, whereas the UNIX example starts the program and waits until it exits, then tells the user.
I have to ask. Why you using memset() to zero pointers, and why are you passing zeroed pointers to a function?
And I'm not sure CreateProcess() allows its last two parameters to be zero.
I don't know, like I said, I tried my best to figure out what to do to give an example but I did say that there was a good chance it was wrong.
Are LPSTARTUPINFO and LPPROCESS_INFORMATION pointers? I assumed they were objects... I wanted to zero the contents of the structures; not the pointers that I didn't know existed.
I'd have skipped those parts but I thought you couldn't pass NULLs as the last two arguments like you said.