Fix some error handling for read() and errno

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Fix some error handling for read() and errno
Дата
Msg-id 20180520000522.GB1603@paquier.xyz
обсуждение исходный текст
Ответы Re: Fix some error handling for read() and errno  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Список pgsql-hackers
Hi all,

This is basically a new thread after what has been discussed for
pg_controldata with its error handling for read():
https://www.postgresql.org/message-id/CABUevEx8ZRV5Ut_FvP2etXiQppx3xVzm7oOaV3AcdHxX81Yt8Q%40mail.gmail.com

While reviewing the core code, I have noticed similar weird error
handling for read().  At the same time, some of those places may use an
incorrect errno, as an error is invoked using an errno which may be
overwritten by another system call.  I found a funny one in slru.c,
for which I have added a note in the patch.  I don't think that this is
worth addressing with more facility, thoughts are welcome.

Attached is a patch addressing the issues I found.

Thanks,
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Fix for FETCH FIRST syntax problems
Следующее
От: Andrew Gierth
Дата:
Сообщение: Re: Fix for FETCH FIRST syntax problems