Author: radu
Date: Thu Sep 4 04:43:52 2008
New Revision: 943
Modified:
trunk/Changes
trunk/qpsmtpd-prefork
Log:
To improve the shutdown of parent and children, send the exiting signal
to the process group (maybe %children is not up to date on very busy
systems).
Modified: trunk/Changes
==============================================================================
--- trunk/Changes (original)
+++ trunk/Changes Thu Sep 4 04:43:52 2008
@@ -1,3 +1,6 @@
+ prefork: improve shutdown of parent (and children) on very busy
+ systems (Diego d'Ambra)
+
prefork: exit codes cleanup (based on patch by Diego d'Ambra)
prefork: detect and reset locked shared memory (based on patch by
Modified: trunk/qpsmtpd-prefork
==============================================================================
--- trunk/qpsmtpd-prefork (original)
+++ trunk/qpsmtpd-prefork Thu Sep 4 04:43:52 2008
@@ -226,15 +226,18 @@
# prevent another signal and disable reaper
$SIG{$sig} = $SIG{CHLD} = $SIG{HUP} = 'IGNORE';
- unlink($pid_file) if $pid_file;
# close socket
$d->close();
- my $cnt = kill 'INT' => keys %children;
- # cleanup shared memory
+ # send signal to process group
+ kill $sig, -$$;
+
+ # cleanup
IPC::Shareable->clean_up;
- info("shutdown of daemon (and $cnt children)");
+ unlink($pid_file) if $pid_file;
+
+ info("shutdown of daemon");
exit;
};