From: Noah Misch <noah@leadboat.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: Obsolete coding in fork_process.c
Date: Thu, 1 May 2014 14:32:31 -0400
Message-ID: <20140501183231.GA1190179@tornado.leadboat.com> (raw)
In-Reply-To: <30040.1398960808@sss.pgh.pa.us>
References: <30040.1398960808@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On Thu, May 01, 2014 at 12:13:28PM -0400, Tom Lane wrote:
> 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.
> * Presently stdout 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 ...
Modern systems have other fflush(NULL) problems:
http://www.nntp.perl.org/group/perl.perl5.porters/2013/09/msg207692.htmlhttp://perl5.git.perl.org/metaconfig.git/blob/master:/U/perl/fflushall.U
--
Noah Misch
EnterpriseDB http://www.enterprisedb.com
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: noah@leadboat.com, tgl@sss.pgh.pa.us
Subject: Re: Obsolete coding in fork_process.c
In-Reply-To: <20140501183231.GA1190179@tornado.leadboat.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox