Re: Close stdout and stderr in syslogger - Mailing list pgsql-hackers

From Святослав Ермилин
Subject Re: Close stdout and stderr in syslogger
Date
Msg-id 580021570105830@iva5-c4dd0484b46b.qloud-c.yandex.net
Whole thread Raw
In response to Re: Close stdout and stderr in syslogger  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Close stdout and stderr in syslogger  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Hi,

> In any case, the proposed patch almost certainly introduces new
> problems, in that you dropped the fcloses's into code that
> executes repeatedly.

I guess it's better to place fclose() right after successful syslogger start. 
In that case we close descriptors just one time. But it's enough to solve the problem.
Developers who debug syslogger generally should see problems before we close descriptors.
In other case they can edit code of syslogger.

There is another way to solve this problem:
We can give users the opportunity to leave or close descriptors.
I.e. config switch for this. But I think that it's too complicated.


One can reproduce the problem by following steps in previous messages.

_________

Regards, Sviatoslav Ermilin
Attachment

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Collation versioning
Next
From: "REIX, Tony"
Date:
Subject: RE: Shared Memory: How to use SYSV rather than MMAP ?