Multithreaded Programming Guide

Exit Print View

Updated: July 2014
 
 

Forking Issues in Process Creation

The default handling of fork() in the Solaris 9 product and earlier Oracle Solaris releases is somewhat different from the way fork() is handled in POSIX threads. For Oracle Solaris releases after Solaris 9, fork() behaves as specified for POSIX threads in all cases.

Table 5–1 compares the differences and similarities of fork() handling in Oracle Solaris threads and pthreads. When the comparable interface is not available either in POSIX threads or in Oracle Solaris threads, the `—' character appears in the table column.

Table 5-1  Comparing POSIX and Oracle Solaris fork() Handling
Oracle Solaris Interface
POSIX Threads Interface
Fork-one model
fork1(2)
fork(2)
fork(2)
Fork-all model
forkall(2)
forkall(2)
Fork safety
pthread_atfork(3C)