From 75decb184ba17196aac9dd536cbdce29223f22fe Mon Sep 17 00:00:00 2001 From: Charlie Brady Date: Tue, 2 Jun 2009 00:11:33 -0700 Subject: [PATCH] Always call setsid, even when we're not daemonizing. >> 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. Signed-off-by: Robert --- Changes | 2 ++ qpsmtpd-prefork | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 88f123f..1c9b8c9 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,7 @@ X.YY - Date + prefork: Fix problem with processes sometimes being "left behind" (Charlie Brady) + prefork: Fix startup when no interface addresses are specified (Devin Carraway) prefork: add multi-address support diff --git a/qpsmtpd-prefork b/qpsmtpd-prefork index aecb417..887f940 100755 --- a/qpsmtpd-prefork +++ b/qpsmtpd-prefork @@ -291,8 +291,8 @@ sub run { open STDERR, '>&STDOUT' or die "open(stderr): $!"; defined (my $pid = fork) or die "fork: $!"; exit 0 if $pid; - POSIX::setsid or die "setsid: $!"; } + POSIX::setsid or die "setsid: $!"; if ($pid_file) { print PID $$,"\n";