/[smeserver]/rpms/qpsmtpd/sme9/0036-prefork-use-new-instance-instead-of-cloning.patch
ViewVC logotype

Contents of /rpms/qpsmtpd/sme9/0036-prefork-use-new-instance-instead-of-cloning.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Sat Feb 2 00:59:45 2013 UTC (11 years, 3 months ago) by slords
Branch: MAIN
CVS Tags: qpsmtpd-0_84-14_el6_sme, qpsmtpd-0_84-16_el6_sme, qpsmtpd-0_84-12_el6_sme, qpsmtpd-0_96-7_el6_sme, qpsmtpd-0_96-2_el6_sme, qpsmtpd-0_84-13_el6_sme, qpsmtpd-0_84-6_el6_sme, qpsmtpd-0_84-18_el6_sme, qpsmtpd-0_84-9_el6_sme, qpsmtpd-0_84-4_el6_sme, qpsmtpd-0_96-11_el6_sme, qpsmtpd-0_84-15_el6_sme, qpsmtpd-0_96-4_el6_sme, qpsmtpd-0_96-3_el6_sme, qpsmtpd-0_96-10_el6_sme, qpsmtpd-0_84-17_el6_sme, qpsmtpd-0_84-7_el6_sme, qpsmtpd-0_96-5_el6_sme, qpsmtpd-0_84-10_el6_sme, qpsmtpd-0_84-8_el6_sme, qpsmtpd-0_96-1_el6_sme, qpsmtpd-0_84-5_el6_sme, qpsmtpd-0_96-6_el6_sme, qpsmtpd-0_96-8_el6_sme, qpsmtpd-0_84-11_el6_sme, qpsmtpd-0_96-9_el6_sme, HEAD
* Fri Feb 1 2013 Shad L. Lords <slords@mail.com> 0.84-4.sme
- Update spec so building on rhel6 works [SME: 7263]

1 From 0b0e4e911a4af89ac0e524b90d89361f829c884c Mon Sep 17 00:00:00 2001
2 From: Hanno Hecker <vetinari@ankh-morp.org>
3 Date: Sat, 28 Feb 2009 08:27:55 +0100
4 Subject: prefork: use new instance instead of cloning
5
6 Create a new instance instead of cloning^copying the base instance,
7 see http://www.nntp.perl.org/group/perl.qpsmtpd/2008/07/msg8134.html ff.
8 ---
9 qpsmtpd-prefork | 13 ++++++-------
10 1 files changed, 6 insertions(+), 7 deletions(-)
11
12 diff --git a/qpsmtpd-prefork b/qpsmtpd-prefork
13 index 93a7120..c176886 100755
14 --- a/qpsmtpd-prefork
15 +++ b/qpsmtpd-prefork
16 @@ -49,7 +49,7 @@ foreach my $sig_name ( split( /\s/, $Config{sig_name} ) )
17 my $VERSION = "1.0";
18
19 # qpsmtpd instances
20 -my ($qpsmtpd, $qpsmtpd_base);
21 +my ($qpsmtpd);
22
23 # cmd's needed by IPC
24 my $ipcrm = '/usr/bin/ipcrm';
25 @@ -276,15 +276,14 @@ sub run {
26 # Hup handler
27 $SIG{HUP} = sub {
28 # reload qpmstpd plugins
29 - $qpsmtpd = $qpsmtpd_base = qpsmtpd_instance('restart' => 1); # reload plugins...
30 + $qpsmtpd = qpsmtpd_instance('restart' => 1); # reload plugins...
31 $qpsmtpd->load_plugins;
32 kill 'HUP' => keys %children;
33 info("reload daemon requested");
34 };
35
36 - # setup qpsmtpd_instance(s), _base is for resetting to a known state
37 - # after each connection
38 - $qpsmtpd = $qpsmtpd_base = qpsmtpd_instance();
39 + # setup qpsmtpd_instance
40 + $qpsmtpd = qpsmtpd_instance();
41
42 if ($detach) {
43 open STDIN, '/dev/null' or die "/dev/null: $!";
44 @@ -462,8 +461,8 @@ sub new_child {
45 "failed to create new object - $!"; # wait here until client connects
46 info("connect from: " . $client->peerhost . ":" . $client->peerport);
47
48 - # clear a previously running instance by cloning the base:
49 - $qpsmtpd = $qpsmtpd_base;
50 + # clear a previously running instance by creating a new instance
51 + $qpsmtpd = qpsmtpd_instance();
52
53 # set STDIN/STDOUT and autoflush
54 # ... no longer use POSIX::dup2: it failes after a few
55 --
56 1.7.2.2
57

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed