use strict; my $pid = fork(); if ($pid) { print "I am parent $$\n"; kill INT => $pid; print "I am parent $$\n"; } elsif (defined($pid)) { print "I am child $$\n"; local $SIG{INT} = sub { die "\nOutta here!\n" }; print "I am child $$\n"; exit 1; } else { print "child was not created\n"; }