Skip Menu |

This queue is for tickets about the Mail-Box CPAN distribution.

Report information
The Basics
Id: 11272
Status: resolved
Priority: 0/
Queue: Mail-Box

People
Owner: MARKOV [...] cpan.org
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

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



Subject: Possibly missing exit() in Mail::Transport::Sendmail
In Mail::Transport::Sendmail::trySend, if the exec() fails, the last statement in the the block is "return 0". This means that *two* processes are running from this point on. The "return 0" should be probably replaced by "exit 1". Regards, Slaven
Excelent catch! How did you find-out? To be honest with you, I stole that piece of code from MailTools. It is even silly code, looking at it: if(open(MAILER, '|-')==0) { { exec $program, '-i', '-f', $from, @to; } is long for unless(open MAILER, '|-', $program, '-i', '-f', $from, @to) or am I missing things that way?
From: srezic [...] cpan.org
[MARKOV - Fri Feb 4 17:28:38 2005]: Show quoted text
> Excelent catch! How did you find-out? > > To be honest with you, I stole that piece of code from MailTools. It is > even silly code, looking at it: > > if(open(MAILER, '|-')==0) > { { exec $program, '-i', '-f', $from, @to; } > > is long for > > unless(open MAILER, '|-', $program, '-i', '-f', $from, @to) > > or am I missing things that way?
With the latter version you lose compatibility with pre-5.8.0 versions. Regards, Slaven