Re: pgsql: Check dup2() results in syslogger - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Check dup2() results in syslogger
Date
Msg-id 2813.1390835584@sss.pgh.pa.us
Whole thread Raw
In response to pgsql: Check dup2() results in syslogger  (Stephen Frost <sfrost@snowman.net>)
Responses Re: pgsql: Check dup2() results in syslogger
List pgsql-committers
Stephen Frost <sfrost@snowman.net> writes:
> Check dup2() results in syslogger
> Consistently check the dup2() call results throughout syslogger.c.
> It's pretty unlikely that they'll error out, but if they do,
> ereport(FATAL) instead of blissfully continuing on.

Meh.  Have you actually tested that an ereport(FATAL) is capable of doing
anything sane right there, with so much syslogger initialization left to
do, and no working stderr?  Please note also that the comment just above
this implies that we are deliberately ignoring any failures here, so I
think FATAL was probably the wrong thing in any case.

> Spotted by the Coverity scanner.

I fear this is mere Coverity-appeasement that has broken code that used
to work.

            regards, tom lane


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix typo in README
Next
From: Stephen Frost
Date:
Subject: Re: pgsql: Check dup2() results in syslogger