Obsolete coding in fork_process.c

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Obsolete coding in fork_process.c
Дата
Msg-id 30040.1398960808@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: Obsolete coding in fork_process.c
Список pgsql-hackers
fork_process.c quoth:
   /*    * Flush stdio channels just before fork, to avoid double-output problems.    * Ideally we'd use fflush(NULL)
here,but there are still a few non-ANSI    * stdio libraries out there (like SunOS 4.1.x) that coredump if we do.    *
Presentlystdout and stderr are the only stdio output channels used by    * the postmaster, so fflush'ing them should be
sufficient.   */   fflush(stdout);   fflush(stderr);
 

Is there any reason not to change this to just fflush(NULL)?  We dropped
support for SunOS 4.1 quite some time ago ...

While it's still true that the postmaster proper doesn't need to fflush
anything but stdout and stderr, this coding seems a bit less than safe
when you consider the possibility of third-party libraries loaded into the
postmaster process.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Display of timestamp in pg_dump custom format
Следующее
От: Noah Misch
Дата:
Сообщение: Re: Obsolete coding in fork_process.c