pgsql: Properly check for readdir/closedir() failures - Mailing list pgsql-committers

From Bruce Momjian
Subject pgsql: Properly check for readdir/closedir() failures
Date
Msg-id E1WR3VV-0005vD-BV@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Properly check for readdir/closedir() failures

Clear errno before calling readdir() and handle old MinGW errno bug
while adding full test coverage for readdir/closedir failures.

Backpatch through 8.4.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/fb918740f307cdde41cca5368e96edea22e9614a

Modified Files
--------------
contrib/pg_archivecleanup/pg_archivecleanup.c |   16 ++++++-
contrib/pg_standby/pg_standby.c               |   17 ++++++-
src/backend/storage/file/fd.c                 |    6 +--
src/bin/initdb/initdb.c                       |   13 ++---
src/bin/pg_basebackup/pg_receivexlog.c        |   22 ++++++++-
src/bin/pg_dump/pg_backup_directory.c         |   17 ++++++-
src/bin/pg_resetxlog/pg_resetxlog.c           |   63 +++++++++++++------------
src/port/dirent.c                             |    8 +++-
src/port/dirmod.c                             |   22 +++++----
src/port/pgcheckdir.c                         |   15 ++----
10 files changed, 127 insertions(+), 72 deletions(-)


pgsql-committers by date:

Previous
From: Bruce Momjian
Date:
Subject: pgsql: Properly check for readdir/closedir() failures
Next
From: Bruce Momjian
Date:
Subject: pgsql: Properly check for readdir/closedir() failures