Threads are created in Linux using
, with one of the four flags:
- CLONE_FS — Shares file-system information with the new thread.
- CLONE_VM — The same memory space is shared.
- CLONE_SIGHAND — Shares signal handlers with the new thread.
- CLONE_FILES — The set of open files is shared with the new thread.