Don't pass an invalid file handle to dup2(). That causes a crash on Windows, thanks to a feature in CRT called Parameter Validation.
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.

snaga/postgres-xl,zeroae/postgres-xl,tpostgres-projects/tPostgres,tpostgres-projects/tPostgres,oberstet/postgres-xl,pavanvd/postgres-xl,arcivanov/postgres-xl,lisakowen/gpdb,adam8157/gpdb,postmind-net/postgres-xl,jmcatamney/gpdb,oberstet/postgres-xl,arcivanov/postgres-xl,jmcatamney/gpdb,lisakowen/gpdb,tpostgres-projects/tPostgres,postmind-net/postgres-xl,kmjungersen/PostgresXL,techdragon/Postgres-XL,50wu/gpdb,lisakowen/gpdb,ashwinstar/gpdb,zeroae/postgres-xl,adam8157/gpdb,xinzweb/gpdb,50wu/gpdb,snaga/postgres-xl,techdragon/Postgres-XL,kmjungersen/PostgresXL,oberstet/postgres-xl,yazun/postgres-xl,jmcatamney/gpdb,ashwinstar/gpdb,xinzweb/gpdb,ovr/postgres-xl,jmcatamney/gpdb,greenplum-db/gpdb,ovr/postgres-xl,Postgres-XL/Postgres-XL,greenplum-db/gpdb,kmjungersen/PostgresXL,ovr/postgres-xl,oberstet/postgres-xl,50wu/gpdb,ashwinstar/gpdb,pavanvd/postgres-xl,ashwinstar/gpdb,xinzweb/gpdb,ovr/postgres-xl,adam8157/gpdb,arcivanov/postgres-xl,50wu/gpdb,yazun/postgres-xl,ashwinstar/gpdb,arcivanov/postgres-xl,jmcatamney/gpdb,greenplum-db/gpdb,xinzweb/gpdb,lisakowen/gpdb,yazun/postgres-xl,lisakowen/gpdb,pavanvd/postgres-xl,adam8157/gpdb,yazun/postgres-xl,zeroae/postgres-xl,ashwinstar/gpdb,greenplum-db/gpdb,Postgres-XL/Postgres-XL,ovr/postgres-xl,snaga/postgres-xl,Postgres-XL/Postgres-XL,kmjungersen/PostgresXL,jmcatamney/gpdb,oberstet/postgres-xl,adam8157/gpdb,jmcatamney/gpdb,yazun/postgres-xl,Postgres-XL/Postgres-XL,greenplum-db/gpdb,50wu/gpdb,kmjungersen/PostgresXL,xinzweb/gpdb,50wu/gpdb,techdragon/Postgres-XL,arcivanov/postgres-xl,xinzweb/gpdb,greenplum-db/gpdb,adam8157/gpdb,snaga/postgres-xl,techdragon/Postgres-XL,pavanvd/postgres-xl,pavanvd/postgres-xl,50wu/gpdb,postmind-net/postgres-xl,tpostgres-projects/tPostgres,ashwinstar/gpdb,lisakowen/gpdb,postmind-net/postgres-xl,ashwinstar/gpdb,xinzweb/gpdb,zeroae/postgres-xl,lisakowen/gpdb,greenplum-db/gpdb,arcivanov/postgres-xl,jmcatamney/gpdb,adam8157/gpdb,techdragon/Postgres-XL,greenplum-db/gpdb,Postgres-XL/Postgres-XL,lisakowen/gpdb,50wu/gpdb,tpostgres-projects/tPostgres,adam8157/gpdb,snaga/postgres-xl,postmind-net/postgres-xl,zeroae/postgres-xl,xinzweb/gpdb