Multithreaded fork Multithreaded fork multithreading multithreading

Multithreaded fork


After a fork, only one thread is running in the child. This is a POSIX standard requirement. See the top answer to the question fork and existing threads ?.


No, the child will only have one thread. Forking a threaded process is not trivial. (See this article Threads and fork(): think twice before mixing them for a good rundown).

I don't know of any way of cloning a process and all its threads, I don't think that's possible on Linux.


No.

A fork creates a new process with his own thread(s), copies the file descriptor and the virtual memory.

A child process does NOT share the same memory with his father. So this is absolutely not the same.