sub catch { my $signal_name = shift ; die "Caught CHLD" ; # or whatever you wish to do! } $SIG{CHLD} = \&catch;