Which Linux system call creates a child process that may share parts of its execution context with the parent?

The story behind the answer

The Linux system call that creates a child process while allowing selected execution context to be shared is clone.

Unlike fork, which traditionally creates a near-copy of the calling process, clone accepts flags that control what the parent and child share. Depending on those flags, they may share virtual memory, file-descriptor tables, signal-handler tables, filesystem information, or other resources.

This flexibility makes clone useful for implementing threads and other process-like execution models. For example, CLONE_VM requests a shared address space, while CLONE_FILES shares the file-descriptor table. Namespace-related flags can place the child in separate Linux namespaces, a foundation of many container technologies.

The answer is not execve: execve replaces the calling process’s program image rather than creating a child. waitpid waits for a child, and open opens a file or device. Modern Linux also provides clone3, a newer interface with a structured argument format, but the classic system call named in the question is clone.

Source: Wikipedia · fact-checked Sept. 2026

Add question to a list

Choose a list to keep this question in: