Use STDOUT/STDERR_FILENO in most of syslogger. This fixes problems on windows when logging collector is used in a service, failing with: FATAL: could not redirect stderr: Bad file descriptor
This is triggered by 76e38b37a5. The problem is that STDOUT/STDERR_FILENO aren't defined on windows, which lead us to use _fileno(stdout) etc, but that doesn't work if stdout/stderr are closed. Author: Andres Freund <[email protected]> Reported-By: Sandeep Thakkar <[email protected]> Message-Id: [email protected] (on pgsql-packagers) Backpatch: 15-, where 76e38b37a5 came in Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c91a216ef7385e78e7eb80355c4d02953711bdba Modified Files -------------- src/backend/postmaster/syslogger.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
