Re: Is psSocketPoll doing the right thing?
От | Fujii Masao |
---|---|
Тема | Re: Is psSocketPoll doing the right thing? |
Дата | |
Msg-id | a710116d-870a-3788-0de0-f94c755272af@oss.nttdata.com обсуждение исходный текст |
Ответ на | Is psSocketPoll doing the right thing? (Kyotaro Horiguchi <horikyota.ntt@gmail.com>) |
Ответы |
Re: Is psSocketPoll doing the right thing?
|
Список | pgsql-hackers |
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
В списке pgsql-hackers по дате отправления: