Home : Products : Gossamer Mail : Discussion :

Products: Gossamer Mail: Discussion: Re: [steger] gpopd.pl is dying: Edit Log

Here is the list of edits for this post
Re: [steger] gpopd.pl is dying
Your system may have a buggy libc, try this patch if it isn't already included in your admin/Plugins/GMail/Pop_Server.pm:
Code:
--- Pop_Server.pm 2004/07/13 21:00:59 1.23
+++ Pop_Server.pm 2004/10/07 00:31:48 1.25
@@ -17,7 +17,7 @@ use vars qw/$EOL $VERSION %PIDS %IPS $AT
# System modules
use Socket;
use Sys::Hostname;
-use POSIX qw/:sys_wait_h setsid/;
+use POSIX qw/:errno_h :sys_wait_h setsid/;
use IO::Handle;

# Gossamer Mail modules
@@ -362,8 +362,14 @@ sub server_opts {
vec($bits, $fd, 1) = 1;
select($bits, undef, undef, 1) or next;

- my $paddr = accept(Client, Server) or last;
- my($port, $iaddr) = sockaddr_in($paddr);
+ my $paddr = accept(Client, Server);
+ unless ($paddr) {
+ logmsg "Accept failed: $!";
+# Some buggy libc (Redhat 7.3 has it) causes a EBADF to occur
+ next if $! == EBADF;
+ last;
+ }
+ my ($port, $iaddr) = sockaddr_in($paddr);
my $name = gethostbyaddr($iaddr,AF_INET) || 'UNKNOWN NAME';
my $ip = inet_ntoa($iaddr) || 'UNKNOWN IP';

Adrian

Last edited by:

brewt: Sep 21, 2005, 4:04 PM

Edit Log: