diff options
author | Cheng-Lung Sung <clsung@FreeBSD.org> | 2006-11-07 03:34:43 +0000 |
---|---|---|
committer | Cheng-Lung Sung <clsung@FreeBSD.org> | 2006-11-07 03:34:43 +0000 |
commit | dbd50d410371b2187d67b5cdffe6f8bafb965cd2 (patch) | |
tree | eec4a70add6b745c4f45fca03c368d20f8aa2094 /mail/p5-Mail-SpamAssassin | |
parent | Add p5-forks 0.20, drop-in replacement for Perl threads using fork(). (diff) |
- fix the [Bug 4594]
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4594
- bump PORTREVISION
PR: ports/105213
Submitted by: Larry Rosenman <ler_AT_lerctr dot org>
Notes
Notes:
svn path=/head/; revision=176674
Diffstat (limited to 'mail/p5-Mail-SpamAssassin')
-rw-r--r-- | mail/p5-Mail-SpamAssassin/Makefile | 1 | ||||
-rw-r--r-- | mail/p5-Mail-SpamAssassin/files/patch-lib-Mail-SpamAssassin-SpamdForkScaling.pm | 53 |
2 files changed, 54 insertions, 0 deletions
diff --git a/mail/p5-Mail-SpamAssassin/Makefile b/mail/p5-Mail-SpamAssassin/Makefile index ae0843e7cac6..d15c2a451862 100644 --- a/mail/p5-Mail-SpamAssassin/Makefile +++ b/mail/p5-Mail-SpamAssassin/Makefile @@ -7,6 +7,7 @@ PORTNAME= Mail-SpamAssassin PORTVERSION= 3.1.7 +PORTREVISION= 1 CATEGORIES= mail perl5 MASTER_SITES= ${MASTER_SITE_APACHE:S/$/:apache/} ${MASTER_SITE_PERL_CPAN:S/$/:cpan/} MASTER_SITE_SUBDIR= spamassassin/source/:apache Mail/:cpan diff --git a/mail/p5-Mail-SpamAssassin/files/patch-lib-Mail-SpamAssassin-SpamdForkScaling.pm b/mail/p5-Mail-SpamAssassin/files/patch-lib-Mail-SpamAssassin-SpamdForkScaling.pm new file mode 100644 index 000000000000..8a1568924774 --- /dev/null +++ b/mail/p5-Mail-SpamAssassin/files/patch-lib-Mail-SpamAssassin-SpamdForkScaling.pm @@ -0,0 +1,53 @@ +--- lib/Mail/SpamAssassin/SpamdForkScaling.pm.orig Wed Oct 4 22:01:16 2006 ++++ lib/Mail/SpamAssassin/SpamdForkScaling.pm Tue Nov 7 11:15:29 2006 +@@ -426,7 +426,13 @@ + dbg("prefork: ordered $kid to accept"); + + # now wait for it to say it's done that +- return $self->wait_for_child_to_accept($sock); ++ my $ret = $self->wait_for_child_to_accept($kid, $sock); ++ if ($ret) { ++ return $ret; ++ } else { ++ # retry with another child ++ return $self->order_idle_child_to_accept(); ++ } + + } + else { +@@ -436,10 +442,11 @@ + } + + sub wait_for_child_to_accept { +- my ($self, $sock) = @_; ++ my ($self, $kid, $sock) = @_; + + while (1) { + my $state = $self->read_one_message_from_child_socket($sock); ++ + if ($state == PFSTATE_BUSY) { + return 1; # 1 == success + } +@@ -447,7 +454,12 @@ + return undef; + } + else { +- die "prefork: ordered child to accept, but child reported state '$state'"; ++ warn "prefork: ordered child $kid to accept, but they reported state '$state', killing rogue"; ++ $self->child_error_kill($kid, $sock); ++ $self->adapt_num_children(); ++ sleep 1; ++ ++ return undef; + } + } + } +@@ -479,6 +491,8 @@ + + sub update_child_status_busy { + my ($self) = @_; ++ ++# if (rand 4 < 1) { $self->report_backchannel_socket("I".pack("N",$self->{pid})."\n");return; warn "TEST for bug 4594"; die; } + # "B b1 b2 b3 b4 \n " + $self->report_backchannel_socket("B".pack("N",$self->{pid})."\n"); + } |