Quote:
|
Originally Posted by socialjazz
i just want a separate thread without the copy
|
Then why not use pthread? Creating threads is a pretty painless process.
If you need to stick with fork(), the glibc manual seems to suggest the common practice is to fork() and call one of the exec functions (execl(), execlp(), etc.) But I'm not 100% sure what the exec call does with the memory... I have to imagine when they say the process is replaced, they mean everything (variables, context, etc.) and not just the instruction set.
Never messed with clone(), but it looks interesting.