*** pgsql/src/backend/postmaster/syslogger.c 2007/09/22 18:19:24 1.29.2.4 --- pgsql/src/backend/postmaster/syslogger.c 2010/04/01 20:12:42 1.29.2.5 *************** *** 18,24 **** * * * IDENTIFICATION ! * $PostgreSQL: pgsql/src/backend/postmaster/syslogger.c,v 1.29.2.3 2007/08/02 23:17:20 adunstan Exp $ * *------------------------------------------------------------------------- */ --- 18,24 ---- * * * IDENTIFICATION ! * $PostgreSQL: pgsql/src/backend/postmaster/syslogger.c,v 1.29.2.4 2007/09/22 18:19:24 tgl Exp $ * *------------------------------------------------------------------------- */ *************** SysLoggerMain(int argc, char *argv[]) *** 180,186 **** */ if (redirection_done) { ! int fd = open(NULL_DEV, O_WRONLY, 0); /* * The closes might look redundant, but they are not: we want to be --- 180,186 ---- */ if (redirection_done) { ! int fd = open(DEVNULL, O_WRONLY, 0); /* * The closes might look redundant, but they are not: we want to be *************** SysLoggerMain(int argc, char *argv[]) *** 190,198 **** */ close(fileno(stdout)); close(fileno(stderr)); ! dup2(fd, fileno(stdout)); ! dup2(fd, fileno(stderr)); ! close(fd); } /* Syslogger's own stderr can't be the syslogPipe, so set it back to --- 190,201 ---- */ close(fileno(stdout)); close(fileno(stderr)); ! if (fd != -1) ! { ! dup2(fd, fileno(stdout)); ! dup2(fd, fileno(stderr)); ! close(fd); ! } } /* Syslogger's own stderr can't be the syslogPipe, so set it back to