Re: Latch-ifying the syslogger process - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Latch-ifying the syslogger process
Date
Msg-id 17889.1336870132@sss.pgh.pa.us
Whole thread Raw
In response to Latch-ifying the syslogger process  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:
> While testing this I discovered a pre-existing bug in the Unix
> implementation of WaitLatchOrSocket: EOF on the socket is reported as
> POLLHUP not POLLIN (at least on my Linux box), which results in
> WaitLatchOrSocket going into an infinite loop, because poll() returns
> immediately but the result bitmask never becomes nonzero.

BTW, I just came across this in Microsoft's documentation of
WSAEventSelect:
Note that Windows Sockets will record only an FD_CLOSE network eventto indicate closure of a virtual circuit. It will
notrecord anFD_READ network event to indicate this condition.
 

which seems to me to indicate that the Windows version of
WaitLatchOrSocket has a related bug.  We want socket EOF to result in
WL_SOCKET_READABLE being returned, no?  Otherwise the caller may never
realize that it has an EOF condition to deal with.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Euler Taveira
Date:
Subject: Re: Draft release notes complete
Next
From: Bruce Momjian
Date:
Subject: Re: Credit in the release notes WAS: Draft release notes complete