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

Annotation of /rpms/qpsmtpd/sme10/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 - (hide annotations) (download)
Sun Feb 7 20:49:54 2016 UTC (8 years, 3 months ago) by stephdl
Branch: MAIN
CVS Tags: qpsmtpd-0_96-19_el7_sme, qpsmtpd-0_96-12_el7_sme, qpsmtpd-0_96-11_el7_sme, qpsmtpd-0_96-16_el7_sme, qpsmtpd-0_96-13_el7_sme, qpsmtpd-0_96-6_el7_sme, qpsmtpd-0_96-18_el7_sme, qpsmtpd-0_96-20_el7_sme, qpsmtpd-0_84-20_el7_sme, qpsmtpd-0_96-17_el7_sme, qpsmtpd-0_96-8_el7_sme, qpsmtpd-0_96-5_el7_sme, qpsmtpd-0_96-2_el7_sme, qpsmtpd-0_96-21_el7_sme, qpsmtpd-0_96-22_el7_sme, qpsmtpd-0_96-14_el7_sme, qpsmtpd-0_96-15_el7_sme, qpsmtpd-0_96-9_el7_sme, qpsmtpd-0_96-4_el7_sme, qpsmtpd-0_96-1_el7_sme, qpsmtpd-0_96-3_el7_sme, qpsmtpd-0_84-18_el7_sme, qpsmtpd-0_96-10_el7_sme, qpsmtpd-0_84-19_el7_sme, HEAD
* Sun Feb 7 2016 stephane de labrusse <stephdl@de-labrusse.fr> 0.84-18.sme
- Build new rpm for sme10

1 stephdl 1.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