]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Don't pass an invalid file handle to dup2(). That causes a crash on
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 1 Apr 2010 20:12:34 +0000 (20:12 +0000)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 1 Apr 2010 20:12:34 +0000 (20:12 +0000)
commit292934de2f62e6d59113461c7ffbfb6bb5e1be86
tree83c75a89820b3d6cbefd11f43d3a663610011e24
parentd1bc3525c072a4c6bbc7bbba5da68cd30adfd1a6
Don't pass an invalid file handle to dup2(). That causes a crash on
Windows, thanks to a feature in CRT called Parameter Validation.

Backpatch to 8.2, which is the oldest version supported on Windows. In
8.2 and 8.3 also backpatch the earlier change to use DEVNULL instead of
NULL_DEV #define for a /dev/null-like device. NULL_DEV was hard-coded to
"/dev/null" regardless of platform, which didn't work on Windows, while
DEVNULL works on all platforms. Restarting syslogger didn't work on
Windows on versions 8.3 and below because of that.
src/backend/postmaster/postmaster.c
src/backend/postmaster/syslogger.c
src/include/c.h