This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
threads documentation: fork on UNIX might not copy all threads.
authorDave Mitchell <davem@fdisolutions.com>
Sun, 1 Feb 2004 15:46:24 +0000 (15:46 +0000)
committerDave Mitchell <davem@fdisolutions.com>
Sun, 1 Feb 2004 15:46:24 +0000 (15:46 +0000)
p4raw-id: //depot/perl@22257

pod/perlthrtut.pod

index 7cac46f..517fdd1 100644 (file)
@@ -985,9 +985,10 @@ Further examples of process-scope changes include umask() and
 changing uids/gids.
 
 Thinking of mixing fork() and threads?  Please lie down and wait
-until the feeling passes-- but in case you really want to know,
-the semantics is that fork() duplicates all the threads.
-(In UNIX, at least, other platforms will do something different.)
+until the feeling passes.  Be aware that the semantics of fork() vary
+between platforms.  For example, some UNIX systems copy all the current
+threads into the child process, while others only copy the thread that
+called fork(). You have been warned!
 
 Similarly, mixing signals and threads should not be attempted.
 Implementations are platform-dependent, and even the POSIX