Are forking() and CreateProcess(with all required arguments), the same thing for Linux and WinXP, respectively?
If they are different, then could someone explain the difference in terms of what happens in each of the two cases?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
They do different things, and on different systems.
CreateProcessis a Windows-only function, whileforkis only on POSIX (e.g. Linux and Mac OSX) systems.The
forksystem call creates a new process and continue execution in both the parent and the child from the point where theforkfunction was called.CreateProcesscreates a new process and load a program from disk. The only similarity is that the end result is a new process is created.For more information, read the respective manual page on
CreateProcessandfork.To summarize:
CreateProcessis similar tofork()followed by one of theexec()functions.