prefork: support two or more parallel running instances (on different ports).

* no 4 or 5 digit long port numbers where the first four digits are the 
    same are supported (e.g. 20025, 20026, 2002), see IPC::Shareable.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@787 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Hanno Hecker 2007-09-03 16:28:34 +00:00
parent 4be7bb40e4
commit 2a5c554cf9

View File

@ -191,7 +191,7 @@ sub run {
} }
# setup shared memory # setup shared memory
$chld_shmem = shmem("qpsmtpd", 1); $chld_shmem = shmem($d_port."qpsmtpd", 1);
untie $chld_shmem; untie $chld_shmem;
# Interrupt handler # Interrupt handler
@ -474,7 +474,7 @@ sub shmem_opt {
my ($chld_shmem, $chld_busy); my ($chld_shmem, $chld_busy);
eval { eval {
$chld_shmem = &shmem("qpsmtpd", 0); #connect to shared memory hash $chld_shmem = &shmem($d_port."qpsmtpd", 0); #connect to shared memory hash
if (tied %{$chld_shmem}) { if (tied %{$chld_shmem}) {
# perform options # perform options