On Feb 20, 2009, at 8:21, Jared Johnson wrote:
The attached diff should fix it for you. I'll commit later if nobody
complains.
It appears this still hasn't been applied. I just applied it myself
and it works for me; is there anything stopping this from being
committed?
(Including the patch below for reference).
Could someone summarize the issue for me? It seems a bit heavy
handed to remove the reuse of the loaded plugins; is that really
necessary? Or am I misunderstanding what this does?
- ask
From bba1ea60c5b8b1ea58e07299995c070eba71e790 Mon Sep 17 00:00:00 2001
From: Hanno Hecker <vetin...@ankh-morp.org>
Date: Sat, 28 Feb 2009 08:27:55 +0100
Subject: [PATCH] prefork: use new instance instead of cloning
Create a new instance instead of cloning^copying the base instance,
see http://www.nntp.perl.org/group/perl.qpsmtpd/2008/07/msg8134.html ff.
---
qpsmtpd-prefork | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/qpsmtpd-prefork b/qpsmtpd-prefork
index 3f7812d..2636504 100755
--- a/qpsmtpd-prefork
+++ b/qpsmtpd-prefork
@@ -46,7 +46,7 @@ delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
my $VERSION = "1.0";
# qpsmtpd instances
-my ($qpsmtpd, $qpsmtpd_base);
+my ($qpsmtpd);
# cmd's needed by IPC
my $ipcrm = '/usr/bin/ipcrm';
@@ -259,15 +259,14 @@ sub run {
# Hup handler
$SIG{HUP} = sub {
# reload qpmstpd plugins
- $qpsmtpd = $qpsmtpd_base = qpsmtpd_instance('restart' => 1); #
reload plugins...
+ $qpsmtpd = qpsmtpd_instance('restart' => 1); # reload plugins...
$qpsmtpd->load_plugins;
kill 'HUP' => keys %children;
info("reload daemon requested");
};
- # setup qpsmtpd_instance(s), _base is for resetting to a known
state
- # after each connection
- $qpsmtpd = $qpsmtpd_base = qpsmtpd_instance();
+ # setup qpsmtpd_instance
+ $qpsmtpd = qpsmtpd_instance();
if ($detach) {
open STDIN, '/dev/null' or die "/dev/null: $!";
@@ -441,8 +440,8 @@ sub new_child {
"failed to create new object - $!"; # wait here until
client connects
info("connect from: " . $client->peerhost . ":" . $client-
>peerport);
- # clear a previously running instance by cloning the base:
- $qpsmtpd = $qpsmtpd_base;
+ # clear a previously running instance by creating a new
instance
+ $qpsmtpd = qpsmtpd_instance();
# set STDIN/STDOUT and autoflush
# ... no longer use POSIX::dup2: it failes after a few
--
1.6.1
--
http://develooper.com/ - http://askask.com/