pgsql: Improve pg_check_dir's handling of closedir() failures.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve pg_check_dir's handling of closedir() failures.
Date: 2015-02-17 16:12:06
Message-ID: E1YNkko-0004xG-5e@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/319406c2ac6b6534d82ff76c6f5c544c8483f9af

Modified Files
--------------
src/port/pgcheckdir.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2015-02-17 17:49:59 pgsql: Remove code to match IPv4 pg_hba.conf entries to IPv4-in-IPv6 ad
Previous Message Robert Haas 2015-02-17 15:57:17 pgsql: Improve pg_check_dir code and comments.