Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TENJ2-0004ZI-2d for pgsql-bugs@postgresql.org; Wed, 19 Sep 2012 16:39:20 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TENJ0-0007dk-Al for pgsql-bugs@postgresql.org; Wed, 19 Sep 2012 16:39:19 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q8JGdDUI029558; Wed, 19 Sep 2012 12:39:13 -0400 (EDT) From: Tom Lane To: reinhard@m4x.de cc: pgsql-bugs@postgresql.org Subject: Re: BUG #7559: syslogger doesn't close stdout and stderr In-reply-to: References: Comments: In-reply-to reinhard@m4x.de message dated "Wed, 19 Sep 2012 15:59:45 -0000" Date: Wed, 19 Sep 2012 12:39:12 -0400 Message-ID: <29557.1348072752@sss.pgh.pa.us> X-Pg-Spam-Score: -2.5 (--) X-Archive-Number: 201209/218 X-Sequence-Number: 34212 reinhard@m4x.de writes: > When initially starting up, syslogger keeps stdout and stderr open instead > of closing them and reopening them from /dev/null for proper daemonisation. How exactly could it "close and reopen" them without losing their identity? And what makes /dev/null necessarily the right substitute? I don't think we should change this within Postgres. We removed logic associated with daemonization altogether in 9.2 --- it's the responsibility of the calling script to close any files it doesn't want left open. regards, tom lane