Koozali.org: home of the SME Server

qmail.pm Cron error "Maybe you meant system() when you said exec()"

Offline pauljclarke

  • ***
  • 61
  • +0/-0
Hi,

I have bugzilla 2.22.2 installed and as part of that there is "whine.pl" file that is called from Cron.

Following leastest updates I have been getting following error (warning) from perl.

Code: [Select]
[Tue Aug 26 07:00:02 2008] whine.pl: Statement unlikely to be reached at /usr/lib/perl5/vendor_perl/5.8.5/Mail/Mailer/qmail.pm line 11.
[Tue Aug 26 07:00:02 2008] whine.pl:    (Maybe you meant system() when you said exec()?)

this is correct as the file qmail.pm reads as follows:

Code: [Select]
package Mail::Mailer::qmail;
use vars qw(@ISA);
require Mail::Mailer::rfc822;
@ISA = qw(Mail::Mailer::rfc822);

sub exec {
    my($self, $exe, $args, $to, $sender) = @_;
    my $address = defined $sender && $sender =~ m/\<(.*?)\>/ ? $1 : $sender;

    exec($exe, (defined $address ? "-f$address" : ()));
    die "ERROR: cannot run $exe: $!";
}

As exec will not return unless there is a error (unlike system) then the 'die' message will not get generated.

From what I've read, perl warns you of this if you are using '-w'.

Question is (as I'm now getting lots of emails from Cron!) how is this fixed?

1- Is this a bug - in that qmail.pm should process a 'system()' and handle failed returns? Then I'll enter as a bug.
2- should the -w flag be turned off? (if so how? where?)

Thanks

Paul

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: qmail.pm Cron error "Maybe you meant system() when you said exec()"
« Reply #1 on: August 26, 2008, 03:50:09 PM »
I have bugzilla 2.22.2 installed and as part of that there is "whine.pl" file that is called from Cron.

Bugzilla is not part of SME server installed from the CDROM. So your post is off-topic for this forum.

Bug reports against bugzilla belong elsewhere in any case.

Offline pauljclarke

  • ***
  • 61
  • +0/-0
Re: qmail.pm Cron error "Maybe you meant system() when you said exec()"
« Reply #2 on: August 26, 2008, 05:59:50 PM »
Please read the POST again...

The error is generated from a .pm file inside perl 5.8.5 not Bugzilla, as it happens to call this process within Perl... and as I stated this happened after a 'update' to SME not Bugzilla.

Hence issue came from within the server - unless you are saying that Perl is not part of it either?

Thanks

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: qmail.pm Cron error "Maybe you meant system() when you said exec()"
« Reply #3 on: August 26, 2008, 07:43:35 PM »
The error is generated from a .pm file inside perl 5.8.5 not Bugzilla, as it happens to call this process within Perl... and as I stated this happened after a 'update' to SME not Bugzilla.

Hence issue came from within the server - unless you are saying that Perl is not part of it either?

Even if the problem is within SME server, your post is off-topic here.

Don't report problems here
- Please report bugs and potential bugs in the bug tracker