[Pdx-pm] forking

Randal L. Schwartz merlyn at stonehenge.com
Thu Jan 25 10:36:26 PST 2007


>>>>> "Michael" == Michael Rasmussen <mikeraz at patch.com> writes:

Michael> I believe this is called a fork bomb.

I've learned to always type "die" at the end of the child branch
from the moment I type the fork.  I won't say how I've learned. :)

    defined(my $kid = fork) or die "Cannot fork: $!";
    unless ($kid) { # kid does
     ...
     die "should not reach here"; # this gets added first..
    }

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


More information about the Pdx-pm-list mailing list