#! perl -slw use strict; use threads; use threads::shared; my $signal :shared = 0; my $parent = $$; print "$$:\tI am the parent.\n"; unless( my $pid = fork){ print "$$:\tI am the child.\n"; lock $signal; $signal = 1; exit; } print "$$:\tWaiting for the child to signal.\n"; sleep 1 until $signal; print "The child signalled."; __END__ c:\test>junk2 1124: I am the parent. 1124: Waiting for the child to signal. -1912: I am the child. The child signalled.