Skip Menu |

This queue is for tickets about the MIME-Lite CPAN distribution.

Report information
The Basics
Id: 90880
Status: open
Priority: 0/
Queue: MIME-Lite

People
Owner: Nobody in particular
Requestors: victor [...] vsespb.ru
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: forks the process if sendmail not found
here is the code from MIME::Lite ==== my $pid = open SENDMAIL, "|-"; defined($pid) or die "open of pipe failed: $!\n"; if ( !$pid ) { ### child exec(@cmd) or die "can't exec $p{Sendmail}: $!\n"; ### NOTREACHED } else { ### parent $self->print( \*SENDMAIL ); close SENDMAIL || die "error closing $p{Sendmail}: $! (exit $?)\n"; $return = 1; } ==== in case exec failed, die "can't exec $p{Sendmail}: $!\n"; has two problems: 1) it will call END{} / DESTROY, when people don't expect (say, they'll have to add InactiveDestroy to DBI etc) 2) if executed in eval {} execution will continue in two separate processes.
Duplicate of #17898