1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-18 05:01:01 +03:00
Commit Graph

5 Commits

Author SHA1 Message Date
Robert Haas
319406c2ac 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
6f03927fce introduced logic to better
handle readdir() and closedir() failures, bu it missed these cases.

Extracted from a larger patch by Marco Nenciarini.
2015-02-17 11:02:46 -05:00
Bruce Momjian
ee42d8f10b 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.
2014-03-21 13:45:11 -04:00
Bruce Momjian
e126958c2e Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
Bruce Momjian
5d950e3b0c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
Tom Lane
671199929d Move a couple of initdb's subroutines into src/port/.
mkdir_p and check_data_dir will be useful in CREATE TABLESPACE, since we
have agreed that that command should handle subdirectory creation just like
initdb creates the PGDATA directory.  Push them into src/port/ so that they
are available to both initdb and the backend.  Rename to pg_mkdir_p and
pg_check_dir, just to be on the safe side.  Add FreeBSD's copyright notice
to pgmkdirp.c, since that's where the code came from originally (this
really should have been in initdb.c).  Very marginal code/comment cleanup.
2010-12-10 19:42:44 -05:00