On 2023/02/09 11:50, Kyotaro Horiguchi wrote:
Hello. While looking a patch, I found that pqSocketPoll passes through the result from poll(2) to the caller and throws away revents. If I understand it correctly, poll() *doesn't* return -1 nor errno by the reason it has set POLLERR, POLLHUP, POLLNVAL, and POLLRDHUP for some of the target sockets, and returns 0 unless poll() itself failed to work.
As far as I understand correctly, poll() returns >0 if "revents" has either of those bits, not 0 nor -1. You're thinking that pqSocketPoll() should check "revents" and return -1 if either of those bits is set? Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION