Re: pgsql: Check dup2() results in syslogger

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Check dup2() results in syslogger
Date: 2014-01-27 15:13:04
Message-ID: 2813.1390835584@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Stephen Frost <sfrost(at)snowman(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Stephen Frost 2014-01-27 15:32:13 Re: pgsql: Check dup2() results in syslogger
Previous Message Heikki Linnakangas 2014-01-27 07:33:38 pgsql: Fix typo in README