pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mario Emmenlauer <mario@emmenlauer.de>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: dup(0) fails on Ubuntu 20.04 and macOS 10.15 with 13.0
Date: Thu, 02 Sep 2021 19:00:46 -0400
Message-ID: <2440671.1630623646@sss.pgh.pa.us> (raw)
In-Reply-To: <ba09e27f-6419-ccaf-0e29-aae32f2f3c2a@emmenlauer.de>
References: <48bafc63-c30f-3962-2ded-f2e985d93e86@emmenlauer.de>
	<3ac84ee7-b4a0-aba5-ddb5-b7c0811fc754@emmenlauer.de>
	<f6b36e1b-cd28-487a-99da-3d7ca772baff@emmenlauer.de>
	<1c4c2254-1812-2913-8630-18d4b9262a89@emmenlauer.de>
	<2071112.1630504486@sss.pgh.pa.us>
	<ba09e27f-6419-ccaf-0e29-aae32f2f3c2a@emmenlauer.de>

Mario Emmenlauer <mario@emmenlauer.de> writes:
> The idea to switch to dup(2) sounds very good to me.

I poked at this some more, and verified that adding "fclose(stdin);"
at the head of PostmasterMain is enough to trigger the reported
failure.  However, after changing fd.c to dup stderr not stdin,
we can pass check-world even with that in place.  So that confirms
that there is no very good reason for the postmaster to require
stdin to be available.

Hence, I pushed the fix to make fd.c use stderr here.  I only
back-patched to v14, because given the lack of other complaints,
I couldn't quite justify touching stable branches for this.

			regards, tom lane





view thread (10+ messages)  latest in thread

Message-ID: <2440671.1630623646@sss.pgh.pa.us>
Permalink:  ../2440671.1630623646@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2440671.1630623646@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mario@emmenlauer.de, pgsql-hackers@lists.postgresql.org
  Subject: Re: dup(0) fails on Ubuntu 20.04 and macOS 10.15 with 13.0
  In-Reply-To: <2440671.1630623646@sss.pgh.pa.us>
  References: <48bafc63-c30f-3962-2ded-f2e985d93e86@emmenlauer.de> <3ac84ee7-b4a0-aba5-ddb5-b7c0811fc754@emmenlauer.de> <f6b36e1b-cd28-487a-99da-3d7ca772baff@emmenlauer.de> <1c4c2254-1812-2913-8630-18d4b9262a89@emmenlauer.de> <2071112.1630504486@sss.pgh.pa.us> <ba09e27f-6419-ccaf-0e29-aae32f2f3c2a@emmenlauer.de> <2440671.1630623646@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox