September 26th, 2003, 09:28 AM
How can I run a child process without fork()?
Hi! I'm new to this forum, so hopefully I won't violate local etiquette. I did not find an answer to this question here yet, so I'm posting my own thread.
From one running parent process, I need to launch a new process (a separate executable, in its own memory space, which the parent will then wait for), but I DO NOT need or want to clone the memory space of the parent. I am new to fork/exec/wait also, but so far my research has indicated that fork() will not exactly accomplish this. Ultimately I must find a way to do this for both Win32 & Unix-like platforms, but an answer for one will be a great start.
Thanks in advance for you time!
Last edited by Ferrando; September 26th, 2003 at 09:51 AM.
September 26th, 2003, 09:57 AM
ALL forking results in a copy of the parent's memory. Don't worry about it, it is an OS thing and won't affect your performance (most of the code pages will not actually be copied if you have a copy on write OS/hardware setup as most are nowadays).
September 26th, 2003, 04:06 PM
I appreciate the advice. Don't really know why I was worried about it anyway. Everything is running just fine. Thanks again!