Re: dup(0) fails on Ubuntu 20.04 and macOS 10.15 with 13.0

From: Mario Emmenlauer <mario(at)emmenlauer(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: dup(0) fails on Ubuntu 20.04 and macOS 10.15 with 13.0
Date: 2021-09-05 08:29:24
Message-ID: 7833d5f1-d4af-40fe-f3c0-bcc49de36fba@emmenlauer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On 03.09.21 01:00, Tom Lane wrote:
> Mario Emmenlauer <mario(at)emmenlauer(dot)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.

Thanks a lot Tom, its appreciated!

All the best,

Mario Emmenlauer

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Michael 2021-09-05 13:35:18 How to observe plan_cache_mode transition from custom to generic plan?
Previous Message jesusthefrog 2021-09-03 21:35:45 Re: gen_random_uuid key collision

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2021-09-05 08:52:51 Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints
Previous Message Jaime Casanova 2021-09-04 19:55:56 Re: SQL:2011 application time