Improve pg_check_dir's handling of closedir() failures.
Robert Haas <rhaas@postgresql.org>
Improve pg_check_dir's handling of closedir() failures. Avoid losing errno if readdir() fails and closedir() works. This also avoids leaking the directory handle when readdir() fails. Commit 6f03927fce038096f53ca67eeab9adb24938f8a6 introduced logic to better handle readdir() and closedir() failures, bu it missed these cases. Extracted from a larger patch by Marco Nenciarini.
Files
| Path | Change | +/− |
|---|---|---|
| src/port/pgcheckdir.c | modified | +9 −1 |