On Tue, Mar 29, 2016 at 8:17 PM, Michael Paquier <michael.paqu...@gmail.com> wrote: > On Tue, Mar 29, 2016 at 1:11 PM, Thomas Munro <thomas.mu...@enterprisedb.com> > wrote: >> (BTW, isn't the select call in libpq_select >> lacking an exceptfds set, and can't it therefore block forever when >> there is an error condition on the socket and no timeout?) > > Hm. I think you're right here when timeout is NULL... It would loop > infinitely. > @Andres (in CC): your thoughts on that regarding the new > WaitEventSetWaitBlock()? The same pattern is used there.
That was a red herring. I was confused because SUSv2 and POSIX call this argument 'errorfds' and say that sockets *also* tell you about errors this way. (Many/most real OSs call the argument 'exceptfds' instead and only use it to tell you about out-of-band data and possibly implementation specific events for devices, pseudo-terminals etc. If you want to know about errors on a socket it's enough to have it in readfds/writefds, and insufficient to have it only in errorfds/exceptfds unless you can find a computer that actually conforms to POSIX.) -- Thomas Munro http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers