⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 svn-commit.2

📁 The BuildBot is a system to automate the compile/test cycle required by most software projects. CVS
💻 2
📖 第 1 页 / 共 3 页
字号:
X-Original-To: jm@jmason.orgDelivered-To: jm@dogma.boxhost.netReceived: from localhost [127.0.0.1]	by localhost with IMAP (fetchmail-6.2.5)	for jm@localhost (single-drop); Thu, 09 Mar 2006 21:44:57 +0000 (GMT)Received: from minotaur.apache.org (minotaur.apache.org [209.237.227.194])	by dogma.boxhost.net (Postfix) with SMTP id 0D3463105BF	for <jm@jmason.org>; Thu,  9 Mar 2006 19:52:50 +0000 (GMT)Received: (qmail 30661 invoked by uid 1833); 9 Mar 2006 19:52:44 -0000Delivered-To: jm@locus.apache.orgReceived: (qmail 30451 invoked from network); 9 Mar 2006 19:52:38 -0000Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199)  by minotaur.apache.org with SMTP; 9 Mar 2006 19:52:38 -0000Received: (qmail 97860 invoked by uid 500); 9 Mar 2006 19:52:29 -0000Delivered-To: apmail-jm@apache.orgReceived: (qmail 97837 invoked by uid 500); 9 Mar 2006 19:52:28 -0000Mailing-List: contact commits-help@spamassassin.apache.org; run by ezmlmPrecedence: bulklist-help: <mailto:commits-help@spamassassin.apache.org>list-unsubscribe: <mailto:commits-unsubscribe@spamassassin.apache.org>List-Post: <mailto:commits@spamassassin.apache.org>Reply-To: "SpamAssassin Dev" <dev@spamassassin.apache.org>List-Id: <commits.spamassassin.apache.org>Delivered-To: mailing list commits@spamassassin.apache.orgReceived: (qmail 97826 invoked by uid 99); 9 Mar 2006 19:52:28 -0000Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49)    by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Mar 2006 11:52:28 -0800X-ASF-Spam-Status: No, hits=-9.4 required=10.0	tests=ALL_TRUSTED,NO_REAL_NAMEReceived: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194)    by apache.org (qpsmtpd/0.29) with SMTP; Thu, 09 Mar 2006 11:52:26 -0800Received: (qmail 29644 invoked by uid 65534); 9 Mar 2006 19:52:06 -0000Message-ID: <20060309195206.29643.qmail@minotaur.apache.org>Content-Type: text/plain; charset="utf-8"MIME-Version: 1.0Content-Transfer-Encoding: 7bitSubject: svn commit: r384590 - in /spamassassin/branches/3.1: ./ lib/Mail/SpamAssassin/ lib/Mail/SpamAssassin/Plugin/ spamd/Date: Thu, 09 Mar 2006 19:52:02 -0000To: commits@spamassassin.apache.orgFrom: sidney@apache.orgX-Mailer: svnmailer-1.0.7X-Virus-Checked: Checked by ClamAV on apache.orgStatus: OX-UID: 60795X-Keywords:                                                                                                    Author: sidneyDate: Thu Mar  9 11:51:59 2006New Revision: 384590URL: http://svn.apache.org/viewcvs?rev=384590&view=revLog:Bug 4696: consolidated fixes for timeout bugsAdded:    spamassassin/branches/3.1/lib/Mail/SpamAssassin/Timeout.pmModified:    spamassassin/branches/3.1/MANIFEST    spamassassin/branches/3.1/lib/Mail/SpamAssassin/Logger.pm    spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/DCC.pm    spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/DomainKeys.pm    spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/Pyzor.pm    spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/Razor2.pm    spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/SPF.pm    spamassassin/branches/3.1/lib/Mail/SpamAssassin/SpamdForkScaling.pm    spamassassin/branches/3.1/spamd/spamd.rawModified: spamassassin/branches/3.1/MANIFESTURL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/MANIFEST?rev=384590&r1=384589&r2=384590&view=diff==============================================================================--- spamassassin/branches/3.1/MANIFEST (original)+++ spamassassin/branches/3.1/MANIFEST Thu Mar  9 11:51:59 2006@@ -89,6 +89,7 @@ lib/Mail/SpamAssassin/SQLBasedAddrList.pm lib/Mail/SpamAssassin/SpamdForkScaling.pm lib/Mail/SpamAssassin/SubProcBackChannel.pm+lib/Mail/SpamAssassin/Timeout.pm lib/Mail/SpamAssassin/Util.pm lib/Mail/SpamAssassin/Util/DependencyInfo.pm lib/Mail/SpamAssassin/Util/Progress.pmModified: spamassassin/branches/3.1/lib/Mail/SpamAssassin/Logger.pmURL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/lib/Mail/SpamAssassin/Logger.pm?rev=384590&r1=384589&r2=384590&view=diff==============================================================================--- spamassassin/branches/3.1/lib/Mail/SpamAssassin/Logger.pm (original)+++ spamassassin/branches/3.1/lib/Mail/SpamAssassin/Logger.pm Thu Mar  9 11:51:59 2006@@ -142,7 +142,7 @@    if ($level eq "error") {     # don't log alarm timeouts or broken pipes of various plugins' network checks-    return if ($message[0] =~ /__(?:alarm|brokenpipe)__ignore__/);+    return if ($message[0] =~ /__ignore__/);      # dos: we can safely ignore any die's that we eval'd in our own modules so     # don't log them -- this is caller 0, the use'ing package is 1, the eval is 2Modified: spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/DCC.pmURL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/DCC.pm?rev=384590&r1=384589&r2=384590&view=diff==============================================================================--- spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/DCC.pm (original)+++ spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/DCC.pm Thu Mar  9 11:51:59 2006@@ -44,6 +44,7 @@  use Mail::SpamAssassin::Plugin; use Mail::SpamAssassin::Logger;+use Mail::SpamAssassin::Timeout; use IO::Socket; use strict; use warnings;@@ -375,15 +376,10 @@    $permsgstatus->enter_helper_run_mode(); -  my $oldalarm = 0;+  my $timer = Mail::SpamAssassin::Timeout->new({ secs => $timeout });+  my $err = $timer->run_and_catch(sub { -  eval {-    # safe to use $SIG{ALRM} here instead of Util::trap_sigalrm_fully(),-    # since there are no killer regexp hang dangers here-    local $SIG{ALRM} = sub { die "__alarm__ignore__\n" };-    local $SIG{__DIE__};   # bug 4631--    $oldalarm = alarm $timeout;+    local $SIG{PIPE} = sub { die "__brokenpipe__ignore__\n" };      my $sock = IO::Socket::UNIX->new(Type => SOCK_STREAM,       Peer => $sockpath) || dbg("dcc: failed to open socket") && die;@@ -419,28 +415,20 @@     }      dbg("dcc: dccifd got response: $response");+  +  }); -    if (defined $oldalarm) {-      alarm $oldalarm; $oldalarm = undef;-    }-  };+  $permsgstatus->leave_helper_run_mode(); -  my $err = $@;-  if (defined $oldalarm) {-    alarm $oldalarm; $oldalarm = undef;+  if ($timer->timed_out()) {+    dbg("dcc: dccifd check timed out after $timeout secs.");+    return 0;   }-  $permsgstatus->leave_helper_run_mode();    if ($err) {     chomp $err;-    $response = undef;-    if ($err eq "__alarm__ignore__") {-      dbg("dcc: dccifd check timed out after $timeout secs.");-      return 0;-    } else {-      warn("dcc: dccifd -> check skipped: $! $err");-      return 0;-    }+    warn("dcc: dccifd -> check skipped: $! $err");+    return 0;   }    if (!defined $response || $response !~ /^X-DCC/) {@@ -494,17 +482,12 @@    # use a temp file here -- open2() is unreliable, buffering-wise, under spamd   my $tmpf = $permsgstatus->create_fulltext_tmpfile($fulltext);-  my $oldalarm = 0;-   my $pid;-  eval {-    # safe to use $SIG{ALRM} here instead of Util::trap_sigalrm_fully(),-    # since there are no killer regexp hang dangers here-    local $SIG{ALRM} = sub { die "__alarm__ignore__\n" };-    local $SIG{PIPE} = sub { die "__brokenpipe__ignore__\n" };-    local $SIG{__DIE__};   # bug 4631 -    $oldalarm = alarm $timeout;+  my $timer = Mail::SpamAssassin::Timeout->new({ secs => $timeout });+  my $err = $timer->run_and_catch(sub {++    local $SIG{PIPE} = sub { die "__brokenpipe__ignore__\n" };      # note: not really tainted, this came from system configuration file     my $path = Mail::SpamAssassin::Util::untaint_file_path($self->{main}->{conf}->{dcc_path});@@ -542,17 +525,7 @@      dbg("dcc: got response: $response"); -    # note: this must be called BEFORE leave_helper_run_mode()-    # $self->cleanup_kids($pid);-    if (defined $oldalarm) {-      alarm $oldalarm; $oldalarm = undef;-    }-  };--  my $err = $@;-  if (defined $oldalarm) {-    alarm $oldalarm; $oldalarm = undef;-  }+  });    if (defined(fileno(*DCC))) {  # still open     if ($pid) {@@ -564,11 +537,14 @@   }   $permsgstatus->leave_helper_run_mode(); +  if ($timer->timed_out()) {+    dbg("dcc: check timed out after $timeout seconds");+    return 0;+  }+   if ($err) {     chomp $err;-    if ($err eq "__alarm__ignore__") {-      dbg("dcc: check timed out after $timeout seconds");-    } elsif ($err eq "__brokenpipe__ignore__") {+    if ($err eq "__brokenpipe__ignore__") {       dbg("dcc: check failed: broken pipe");     } elsif ($err eq "no response") {       dbg("dcc: check failed: no response");@@ -645,47 +621,37 @@   my ($self, $options, $tmpf) = @_;   my $timeout = $options->{report}->{conf}->{dcc_timeout}; -  $options->{report}->enter_helper_run_mode();+  # note: not really tainted, this came from system configuration file+  my $path = Mail::SpamAssassin::Util::untaint_file_path($options->{report}->{conf}->{dcc_path}); -  my $oldalarm = 0;+  my $opts = $options->{report}->{conf}->{dcc_options} || ''; -  eval {-    local $SIG{ALRM} = sub { die "__alarm__ignore__\n" };-    local $SIG{PIPE} = sub { die "__brokenpipe__ignore__\n" };-    local $SIG{__DIE__};   # bug 4631+  my $timer = Mail::SpamAssassin::Timeout->new({ secs => $timeout }); -    $oldalarm = alarm $timeout;--    # note: not really tainted, this came from system configuration file-    my $path = Mail::SpamAssassin::Util::untaint_file_path($options->{report}->{conf}->{dcc_path});+  $options->{report}->enter_helper_run_mode();+  my $err = $timer->run_and_catch(sub { -    my $opts = $options->{report}->{conf}->{dcc_options} || '';+    local $SIG{PIPE} = sub { die "__brokenpipe__ignore__\n" };      my $pid = Mail::SpamAssassin::Util::helper_app_pipe_open(*DCC,-	$tmpf, 1, $path, "-t", "many", split(' ', $opts));+        $tmpf, 1, $path, "-t", "many", split(' ', $opts));     $pid or die "$!\n";      my @ignored = <DCC>;     $options->{report}->close_pipe_fh(\*DCC);-     waitpid ($pid, 0);-    if (defined $oldalarm) {-      alarm $oldalarm; $oldalarm = undef;-    }-  };+  +  });+  $options->{report}->leave_helper_run_mode(); -  my $err = $@;-  if (defined $oldalarm) {-    alarm $oldalarm; $oldalarm = undef;+  if ($timer->timed_out()) {+    dbg("reporter: DCC report timed out after $timeout seconds");+    return 0;   } -  $options->{report}->leave_helper_run_mode();-   if ($err) {     chomp $err;-    if ($err eq "__alarm__ignore__") {-      dbg("reporter: DCC report timed out after $timeout seconds");-    } elsif ($err eq "__brokenpipe__ignore__") {+    if ($err eq "__brokenpipe__ignore__") {       dbg("reporter: DCC report failed: broken pipe");     } else {       warn("reporter: DCC report failed: $err\n");Modified: spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/DomainKeys.pmURL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/DomainKeys.pm?rev=384590&r1=384589&r2=384590&view=diff==============================================================================--- spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/DomainKeys.pm (original)+++ spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/DomainKeys.pm Thu Mar  9 11:51:59 2006@@ -34,6 +34,8 @@  use Mail::SpamAssassin::Plugin; use Mail::SpamAssassin::Logger;+use Mail::SpamAssassin::Timeout;+ use strict; use warnings; use bytes;@@ -165,30 +167,22 @@   }    my $timeout = $scan->{conf}->{domainkeys_timeout};-  my $oldalarm = 0; -  eval {-    local $SIG{ALRM} = sub { die "__alarm__ignore__\n" };-    local $SIG{__DIE__};   # bug 4631-    $oldalarm = alarm($timeout);+  my $timer = Mail::SpamAssassin::Timeout->new({ secs => $timeout });+  my $err = $timer->run_and_catch(sub {+     $self->_dk_lookup_trapped($scan, $message, $domain);-    if (defined $oldalarm) {-      alarm $oldalarm; $oldalarm = undef;-    }-  };--  my $err = $@;-  if (defined $oldalarm) {-    alarm $oldalarm; $oldalarm = undef;++  });++  if ($timer->timed_out()) {+    dbg("dk: lookup timed out after $timeout seconds");+    return 0;   }    if ($err) {     chomp $err;-    if ($err eq "__alarm__ignore__") {-      dbg("dk: lookup timed out after $timeout seconds");-    } else {-      warn("dk: lookup failed: $err\n");-    }+    warn("dk: lookup failed: $err\n");     return 0;   } Modified: spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/Pyzor.pmURL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/Pyzor.pm?rev=384590&r1=384589&r2=384590&view=diff==============================================================================--- spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/Pyzor.pm (original)+++ spamassassin/branches/3.1/lib/Mail/SpamAssassin/Plugin/Pyzor.pm Thu Mar  9 11:51:59 2006@@ -35,6 +35,7 @@  use Mail::SpamAssassin::Plugin; use Mail::SpamAssassin::Logger;+use Mail::SpamAssassin::Timeout; use strict; use warnings; use bytes;@@ -229,27 +230,22 @@    $pyzor_count = 0;   $pyzor_whitelisted = 0;--  $permsgstatus->enter_helper_run_mode();+  my $pid;    # use a temp file here -- open2() is unreliable, buffering-wise, under spamd   my $tmpf = $permsgstatus->create_fulltext_tmpfile($fulltext);-  my $oldalarm = 0; -  my $pid;-  eval {-    # safe to use $SIG{ALRM} here instead of Util::trap_sigalrm_fully(),-    # since there are no killer regexp hang dangers here-    local $SIG{ALRM} = sub { die "__alarm__ignore__\n" };-    local $SIG{PIPE} = sub { die "__brokenpipe__ignore__\n" };-    local $SIG{__DIE__};   # bug 4631+  # note: not really tainted, this came from system configuration file+  my $path = Mail::SpamAssassin::Util::untaint_file_path($self->{main}->{conf}->{pyzor_path});++  my $opts = $self->{main}->{conf}->{pyzor_options} || ''; -    $oldalarm = alarm $timeout;+  $permsgstatus->enter_helper_run_mode(); -    # note: not really tainted, this came from system configuration file-    my $path = Mail::SpamAssassin::Util::untaint_file_path($self->{main}->{conf}->{pyzor_path});+  my $timer = Mail::SpamAssassin::Timeout->new({ secs => $timeout });+  my $err = $timer->run_and_catch(sub { -    my $opts = $self->{main}->{conf}->{pyzor_options} || '';+    local $SIG{PIPE} = sub { die "__brokenpipe__ignore__\n" };       dbg("pyzor: opening pipe: " . join(' ', $path, $opts, "check", "< $tmpf")); @@ -273,21 +269,7 @@       die("internal error\n");     } -    # note: this must be called BEFORE leave_helper_run_mode()-    # $self->cleanup_kids($pid);--    # attempt to call this inside the eval, as leaving this scope is-    # a slow operation and timing *that* out is pointless-    if (defined $oldalarm) { -      alarm $oldalarm; $oldalarm = undef;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -