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

From Stephen Frost
Subject Re: pgsql: Check dup2() results in syslogger
Date
Msg-id 20140127171705.GF31026@tamriel.snowman.net
Whole thread Raw
In response to Re: pgsql: Check dup2() results in syslogger  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgsql: Check dup2() results in syslogger
List pgsql-committers
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> You shouldn't really raise that argument against the guy who made the
> original commit in question ;-).

Figures. :)  Not sure how I missed that.

[...]

Right, I had followed that.

> Now ideally, the way we do that is to reconnect its stderr to /dev/null,
> but if either the open(DEVNULL) or the dup2() calls were to fail, it will
> presumably still work to leave the file descriptors just-plain-closed.
> If the syslogger process then attempts to write on stderr, libc's internal
> write() calls will fail, but so what?  We wanted the output to go to the
> bit bucket anyhow.

Ok, I see your point that it wouldn't much matter if we tried to
complain at this point about the dup2() calls failing.

> In short, this patch was ill considered.  Please revert.  If we need
> to silence a Coverity complaint, perhaps a cast-to-void will do?

Sure, I'll adjust it accordingly.

    Thanks,

        Stephen

Attachment

pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: Check dup2() results in syslogger
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Check dup2() results in syslogger