Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Re: [steger] gpopd.pl is dying

Quote Reply
Re: [steger] gpopd.pl is dying In reply to
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
Subject Author Views Date
Thread gpopd.pl is dying steger 3501 Sep 21, 2005, 2:13 AM
Thread Re: [steger] gpopd.pl is dying
brewt 3418 Sep 21, 2005, 4:04 PM
Thread Re: [brewt] gpopd.pl is dying
steger 3408 Sep 22, 2005, 1:46 AM
Thread Re: [steger] gpopd.pl is dying
brewt 3400 Sep 22, 2005, 11:43 AM
Post Re: [brewt] gpopd.pl is dying
steger 3394 Sep 23, 2005, 11:27 PM