Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* We rely heavily on various flags the CLONE function understands:
- CLONE_VM, CLONE_FS, CLONE_FILES
- These flags select semantics with shared address space and
- file descriptors according to what POSIX requires.
- CLONE_SIGHAND, CLONE_THREAD
- This flag selects the POSIX signal semantics and various
- other kinds of sharing (itimers, POSIX timers, etc.).
- CLONE_SETTLS
- The sixth parameter to CLONE determines the TLS area for the
- new thread.
- CLONE_PARENT_SETTID
- The kernels writes the thread ID of the newly created thread
- into the location pointed to by the fifth parameters to CLONE.
- Note that it would be semantically equivalent to use
- CLONE_CHILD_SETTID but it is be more expensive in the kernel.
- CLONE_CHILD_CLEARTID
- The kernels clears the thread ID of a thread that has called
- sys_exit() in the location pointed to by the seventh parameter
- to CLONE.
- The termination signal is chosen to be zero which means no signal
- is sent. */
- const int clone_flags = (CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SYSVSEM
- | CLONE_SIGHAND | CLONE_THREAD
- | CLONE_SETTLS | CLONE_PARENT_SETTID
- | CLONE_CHILD_CLEARTID
- | 0);
Add Comment
Please, Sign In to add comment