Provided by: manpages-dev_3.01-1_all clone, __clone2 - create a
child process int clone(int (*fn)(void *), void *child_stack,
int flags, void *arg, ... /* pid_t *pid, struct user_desc *tls,
pid_t *ctid */ ); clone() creates a new process, in a manner
similar to fork(2). It is actually a library function layered on
top of the underlying clone() system call, hereinafter referred
to as sys_clone. A description of sys_clone is given towards the
end of this page. Unlike fork(2), these calls allow the child
process to share parts of its execution context with the calling
process, such as the memory space, the table of file
descriptors, and the table of signal handlers. (Note that on
this manual page, "calling process" normally corresponds to
"parent process". But see the description of CLONE_PARENT
below.) The main use of clone() is to implement threads:
multiple threads of control in a program that run concurrently
in a shared memory space. When the child process is created with
clone(), it executes the function a