On Sat, 23 May 2009, Charlie Brady wrote:
On Fri, 22 May 2009, Charlie Brady wrote:
On Fri, 22 May 2009, J wrote:
> However, I'm back to seeing the connection processes being left behind,
> despite an explicit quit from the remote host.
...
It looks to me as though qpsmtpd should have started a new process group with
the parent process, but hasn't. Or the developer assumed that qpsmtpd would
be set up as leader of a process group, but it isn't in this circumstance.
Try this as your run file:
#!/bin/sh
exec 2>&1
exec \
/usr/local/bin/softlimit -m 1000000000 \
/usr/local/bin/pgrphack \
/usr/bin/perl -T ./qpsmtpd-prefork \
--listen-address 0.0.0.0:25 \
--listen-address 0.0.0.0:587 \
--children 30 \
--idle-children 5 \
--max-from-ip 2 \
--user smtpd
Here's where the bug is:
if ($detach) {
open STDIN, '/dev/null' or die "/dev/null: $!";
open STDOUT, '>/dev/null' or die "/dev/null: $!";
open STDERR, '>&STDOUT' or die "open(stderr): $!";
defined (my $pid = fork) or die "fork: $!";
exit 0 if $pid;
POSIX::setsid or die "setsid: $!";
}
That should be:
if ($detach) {
open STDIN, '/dev/null' or die "/dev/null: $!";
open STDOUT, '>/dev/null' or die "/dev/null: $!";
open STDERR, '>&STDOUT' or die "open(stderr): $!";
defined (my $pid = fork) or die "fork: $!";
exit 0 if $pid;
}
POSIX::setsid or die "setsid: $!";