On Thu, 23 Oct 2008 16:34:35 -0600
Sam Masiello <[EMAIL PROTECTED]> wrote:

> 
> Starting with revision 946 in subversion, I encounter the following error 
> coming from qpsmtpd whenever a connection is made.  No banner is ever 
> received by the connecting server:
> 
> getpeername() on closed socket GEN1 at 
> /usr/lib/perl5/5.8.8/i386-linux-thread-multi/IO/Socket.pm line 206.
Hmm, at least it's obvoius why it's happening... (and: the ->connected
just calls gepeername() to see if a socket is connected).
Can you try the attached diff and tell if there are any other weird
things with this? It should not make any difference, since we're in our
own process in -forkserver.

> I am currently using qpsmtpd-forkserver.  I did not validate whether or not 
> this issue occurs in qpsmtpd, -async, or -prefork.
Not in -prefork, haven't tested -async.

        Hanno
Index: qpsmtpd-forkserver
===================================================================
--- qpsmtpd-forkserver	(revision 953)
+++ qpsmtpd-forkserver	(working copy)
@@ -307,7 +307,6 @@
     # dup to STDIN/STDOUT
     POSIX::dup2(fileno($client), 0);
     POSIX::dup2(fileno($client), 1);
-    close $client;
     
     $qpsmtpd->start_connection
       (
@@ -320,6 +319,7 @@
     
     $qpsmtpd->run_hooks("post-connection");
     $qpsmtpd->connection->reset;
+    close $client;
     exit;                                   # child leaves
   }
 }

Reply via email to