Re: [exim] Lost connection during delay

Top Page
Delete this message
Reply to this message
Author: Ian FREISLICH
Date:  
To: exim-users
CC: Giuliano Gavazzi
Subject: Re: [exim] Lost connection during delay
Tony Finch wrote:
> On Fri, 6 May 2005, Giuliano Gavazzi wrote:
> >
> > so POLLHUP is defined but I have no idea if it is supported.
>
> Probably not. Thanks for checking.


It is, at least on our aged RedHat 7.1 systems here. The irritation
is I have to -D_XOPEN_SOURCE -D_BSD_SOURCE to get it to find poll().

But, checking my source which does detect closed or vanished sockets
uses this to do so, so I'm not sure which one hits:

                        if (pollfd[0].revents & (POLLERR | POLLHUP | POLLNVAL))
                                goto bail;


(And it's a fairly hairy state machine so no complaints about the
goto please.)
This works on a 2.2.26 kernel (whatever that means).

AFAIK, select() on FreeBSD is implimented as a wrapper on poll().

--
Ian Freislich