You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by mm...@apache.org on 2009/09/21 18:21:47 UTC

svn commit: r817311 - /spamassassin/trunk/spamd/spamd.raw

Author: mmartinec
Date: Mon Sep 21 16:21:47 2009
New Revision: 817311

URL: http://svn.apache.org/viewvc?rev=817311&view=rev
Log:
Bug 6191: takes almost a minute to start spamd on a
slow machine, bump up the retry counter to 90 seconds

Modified:
    spamassassin/trunk/spamd/spamd.raw

Modified: spamassassin/trunk/spamd/spamd.raw
URL: http://svn.apache.org/viewvc/spamassassin/trunk/spamd/spamd.raw?rev=817311&r1=817310&r2=817311&view=diff
==============================================================================
--- spamassassin/trunk/spamd/spamd.raw (original)
+++ spamassassin/trunk/spamd/spamd.raw Mon Sep 21 16:21:47 2009
@@ -2504,10 +2504,14 @@
   defined( my $pid = fork ) or die "spamd: cannot fork: $!\n";
   if ($pid) {
     my $child_stat;
-    for (my $retry=30, my $waited=0; ($retry>0) && !$serverstarted && ($waited != $pid); $retry--) {
-      warn ("waitpid failed: $waited $!") if ($waited);
+    # Bug 6191: takes almost a minute on a slow machine, bump to 90 seconds
+    for (my $retry=90, my $waited=0;
+         $retry > 0 && !$serverstarted && $waited != $pid;
+         $retry--)
+    {
+      warn("waitpid failed: $waited $!")  if $waited;
       sleep 1;
-      $waited=waitpid($pid, WNOHANG);
+      $waited = waitpid($pid, WNOHANG);
       $child_stat = $?  if $waited > 0;
     }
     die sprintf("child process [%s] exited or timed out ".