Help for this page
#!/usr/bin/perl use strict; ... } else { print "I'm the child and my pid is $$. My parent is " . getpp +id() . "\n"; }
$ while true; do perl fork.pl; sleep 1; done I'm the parent and my pid is 2094. My child is 2095 ... I'm the parent and my pid is 2106. My child is 2107 I'm the child and my pid is 2107. My parent is 1 ^C