Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

gpopd.pl is dying

Quote Reply
gpopd.pl is dying
hello there,

my gpopd.pl is dying almost every day.
any idea what could be the reason for that?

the perl version i run is: 5.8.4

any idea?

thanks for help!

chris
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
Quote Reply
Re: [brewt] gpopd.pl is dying In reply to
hey adrian,

the version i have here is:
# Revision : $Id: Pop_Server.pm,v 1.21 2004/05/18 00:18:31 brewt Exp $

so probably i cant patch it?

mhh

chris
Quote Reply
Re: [steger] gpopd.pl is dying In reply to
It still should be fine.

Adrian
Quote Reply
Re: [brewt] gpopd.pl is dying In reply to
hey adrian!

i guess you were right.

just patched the Pop_Server.pm running now since 2 days. - lets see whats happen within
the next days.

chris