use English; use strict; use warnings; use Data::Dumper; # Comment this out and rc=0... $SIG{CHLD} = sub { _lostChild(wait()) }; sub _lostChild { print "_lostChild args:\n", Dumper(\@_), "\n" }; my $rc=system('date'); print STDERR "rc=$rc\n";