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?  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: John Naylor
Дата:
Сообщение: Re: Can we do something to help stop users mistakenly using force_parallel_mode?
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Consolidate ItemPointer to Datum conversion functions