~ubuntu-branches/ubuntu/utopic/spamassassin/utopic-proposed

« back to all changes in this revision

Viewing changes to lib/Mail/SpamAssassin/Reporter.pm

  • Committer: Bazaar Package Importer
  • Author(s): Noah Meyerhans
  • Date: 2010-01-26 22:53:12 UTC
  • mfrom: (1.1.13 upstream) (5.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100126225312-wkftb10idc1kz2aq
Tags: 3.3.0-1
* New upstream version.
* Switch to dpkg-source 3.0 (quilt) format

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
use strict;
23
23
use warnings;
24
24
use bytes;
25
 
use POSIX ":sys_wait_h";
 
25
use re 'taint';
26
26
use Mail::SpamAssassin::Logger;
27
27
 
28
28
use vars qw{
93
93
}
94
94
 
95
95
###########################################################################
96
 
# non-public methods.
97
 
 
98
 
# Close an fh piped to a process, possibly exiting if the process
99
 
# returned nonzero.  thanks to nix /at/ esperi.demon.co.uk for this.
100
 
sub close_pipe_fh {
101
 
  my ($self, $fh) = @_;
102
 
 
103
 
  return if close ($fh);
104
 
 
105
 
  my $exitstatus = $?;
106
 
  dbg("reporter: raw exit code: $exitstatus");
107
 
 
108
 
  if (WIFEXITED ($exitstatus) && (WEXITSTATUS ($exitstatus))) {
109
 
    die "reporter: exited with non-zero exit code " . WEXITSTATUS($exitstatus) . "\n";
110
 
  }
111
 
 
112
 
  if (WIFSIGNALED ($exitstatus)) {
113
 
    die "reporter: exited due to signal " . WTERMSIG($exitstatus) . "\n";
114
 
  }
115
 
}
116
 
 
117
 
###########################################################################
118
96
 
119
97
sub create_fulltext_tmpfile {
120
98
  Mail::SpamAssassin::PerMsgStatus::create_fulltext_tmpfile(@_);