Is psSocketPoll doing the right thing?

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

It doesn't seem to be the intended behavior since the function sets
POLLERR to pollfd.events. (but the bit is ignored by poll(), though)

Is the above diagnosis correct?

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Fix GUC_NO_SHOW_ALL test scenario in 003_check_guc.pl
Следующее
От: Andres Freund
Дата:
Сообщение: Re: tests against running server occasionally fail, postgres_fdw & tenk1