What is the difference between these settings?
$SIG{CHLD} = \'IGNORE\'
$SIG{CHLD} = \'DEFAULT\'
$SIG{CHLD} = \'\'
$SIG{CHLD} = undef
See %SIG.
$SIG{CHLD} = 'IGNORE'; causes your process to ignore SIGCHLD signals.
$SIG{CHLD} = 'DEFAULT'; causes your process to treat SIGCHLD signals as it would had you not messed with $SIG{CHLD} or equivalent. According to kill(1), a process on my system ignores SIGCHLD by default
$SIG{CHLD} = ''; and $SIG{CHLD} = undef; are not valid values.
As for reaping, children of a parent whose SIGCHLD handler is explicitely set to IGNORE will be reaped automatically by the system as soon as it exits.
$ perl -e'
my $pid = fork;
if (!$pid) { sleep(1); exit; }
sleep(2);
system "ps -o pid,stat,command $pid";
'
PID STAT COMMAND
14667 ZN+ [perl]
$ perl -e'
$SIG{CHLD}="IGNORE";
my $pid = fork;
if (!$pid) { sleep(1); exit; }
sleep(2);
system "ps -o pid,stat,command $pid";
'
PID STAT COMMAND
$