]> granicus.if.org Git - postgresql/commit
Improve pg_check_dir's handling of closedir() failures.
authorRobert Haas <rhaas@postgresql.org>
Tue, 17 Feb 2015 15:19:30 +0000 (10:19 -0500)
committerRobert Haas <rhaas@postgresql.org>
Tue, 17 Feb 2015 16:08:40 +0000 (11:08 -0500)
commitd7d294f5935e157f239b32c6d1f3d4e923a4eed5
tree3f5bb236805da150e8eaa97253ad19123701910d
parent2df854f842bee71cb59f7307b5bad9c3235be2ec
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.
src/port/pgcheckdir.c