Reputation: 7118
Is there any Linux
equivalent of fork1
of Solaris
? The Solaris man pages say: A call to fork()
is identical to a call to fork1();
only the calling thread is replicated in the child process. This is the POSIX-specified behavior for fork()
.
Upvotes: 0
Views: 260
Reputation: 1
Per the Linux fork()
man page:
...
Note the following further points:
- The child process is created with a single thread—the one that called
fork()
. The entire virtual address space of the parent is replicated in the child, including the states of mutexes, condition variables, and other pthreads objects; the use ofpthread_atfork(3)
may be helpful for dealing with problems that this can cause....
Since both fork()
and fork1()
on Solaris replicate only the calling thread in the child process, the Linux fork()
call would be the equivalent.
Upvotes: 1