]> 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:02:46 +0000 (11:02 -0500)
commit319406c2ac6b6534d82ff76c6f5c544c8483f9af
treea35bc25207d22fde5a8a8fc841aab7f3611e4919
parent6b700301c36e380eb4972ab72c0e914cae60f9fd
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