From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
Cc: | PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: Syslogger tries to write to /dev/null on Windows |
Date: | 2010-04-01 20:18:54 |
Message-ID: | 22041.1270153134@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> The open() fails and returns a return code as you would expect. But the
> dup2() call crashes when passed an invalid file descriptor, I just
> tested that with a small test program on Windows.
Ah, thanks Windows :-(
> ! if (fd != -1)
> ! {
> ! dup2(fd, fileno(stdout));
> ! dup2(fd, fileno(stderr));
> ! close(fd);
> ! }
+1 for fixing it like this. It's cleaner anyway.
Is that actually the cause of the original bug report, or is there
another issue yet to solve?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2010-04-01 20:53:33 | Re: Syslogger tries to write to /dev/null on Windows |
Previous Message | Heikki Linnakangas | 2010-04-01 19:54:13 | Re: Syslogger tries to write to /dev/null on Windows |