Subject: | Bug: exit code handling if sig chld is set to ignore |
Hi,
if $SIG{CHLD} is set to "IGNORE", then $? contains "-1" if a system call was successful.
The method send_by_sendmail return undef, even if the email was send successfully:
$return = ( ( $? >> 8 ) ? undef: 1 );
It should be possible to catch -1. The solution:
if ($? == -1) {
$return = 1;
} else {
$return = ( ( $? >> 8 ) ? undef: 1 );
}
Cheers,
Jonny