Re: Syslogger tries to write to /dev/null on Windows

Поиск
Список
Период
Сортировка
От 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  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список 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 по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Syslogger tries to write to /dev/null on Windows
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Syslogger tries to write to /dev/null on Windows