Re: [PATCH] tin hangs after network connection went down

Urs Janßen <[email protected]> Sat, 19 Dec 2009 16:02:24 +0100
Newsgroups gmane.network.tin.devel
Message-ID <[email protected]>
On Thu, Dec 17, 2009 at 11:25:52PM +0100, Dennis Preiser wrote:
> Attached a possible fix. It uses alarm() in get_server() to start (and 
> stop) a timer and installs a signal handler for SIGALRM in signal.c which 
> does a tin_done(NNTP_ERROR_EXIT). The "if 0'ed" NNTP_READ_TIMEOUT from 
> nntplib.h is (re)used to define the timeout.
>
> Open issue:
> I'm not sure whether alarm() is available on all platforms. I guess  
> alarm() is available when SIGALRM is defined, but I'm not sure.

I've added a configure check for alarm() and replaced the ifdef SIGALRMs
with if defined(HAVE_ALARM) && defined(SIGALRM).

urs
-- 
"Only whimps use tape backup: _real_ men just upload their important stuff
 on ftp, and let the rest of the world mirror it ;)" - Linus