| От | Tom Lane |
|---|---|
| Тема | Re: Syslogger tries to write to /dev/null on Windows |
| Дата | |
| Msg-id | 22041.1270153134@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Syslogger tries to write to /dev/null on Windows (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>) |
| Ответы |
Re: Syslogger tries to write to /dev/null on Windows
|
| Список | pgsql-bugs |
Heikki Linnakangas <heikki.linnakangas@enterprisedb.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
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера