Thursday, 19 September 2013

Is it true that fork() calls clone() internally?

Is it true that fork() calls clone() internally?

I read here that clone() system call is used to create a thread in Linux.
Now the syntax of clone() is such that a starting routine/function address
is needed to be passed to it.
But here on this page it is written that fork() calls clone() internally.
So my question is how do child process created by fork() starts running
the part of code which is after fork() call, i.e. how does it not require
a function as starting point?
If the links I provided have incorrect info, then please guide me to some
better links/resources.
Thanks

No comments:

Post a Comment