Re: pg_check_dir comments and implementation mismatch
Вложения
В списке pgsql-hackers по дате отправления:
| От | Marco Nenciarini |
|---|---|
| Тема | Re: pg_check_dir comments and implementation mismatch |
| Дата | |
| Msg-id | 54DCB94A.8000204@2ndquadrant.it обсуждение исходный текст |
| Ответ на | Re: pg_check_dir comments and implementation mismatch (Robert Haas <robertmhaas@gmail.com>) |
| Ответы |
Re: pg_check_dir comments and implementation mismatch
|
| Список | pgsql-hackers |
Il 02/02/15 21:48, Robert Haas ha scritto: > On Sat, Jan 31, 2015 at 8:28 AM, Marco Nenciarini > <marco.nenciarini@2ndquadrant.it> wrote: >> Il 30/01/15 03:54, Michael Paquier ha scritto: >>> On Fri, Jan 30, 2015 at 2:49 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >>>> There is at least one other bug in that function now that I look at it: >>>> in event of a readdir() failure, it neglects to execute closedir(). >>>> Perhaps not too significant since all existing callers will just exit() >>>> anyway after a failure, but still ... >>> I would imagine that code scanners like coverity or similar would not >>> be happy about that. ISTM that it is better to closedir() >>> appropriately in all the code paths. >>> >> >> I've attached a new version of the patch fixing the missing closedir on >> readdir error. > > If readir() fails and closedir() succeeds, the return will be -1 but > errno will be 0. > The attached patch should fix it. Regards, Marco -- Marco Nenciarini - 2ndQuadrant Italy PostgreSQL Training, Services and Support marco.nenciarini@2ndQuadrant.it | www.2ndQuadrant.it
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера