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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mario Emmenlauer <mario(at)emmenlauer(dot)de>
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-01 15:56:57
Message-ID: 2077915.1630511817@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Mario Emmenlauer <mario(at)emmenlauer(dot)de> writes:
> The idea to switch to dup(2) sounds very good to me. Also, while at it,
> maybe the error message could be improved? The kids nowadays don't learn
> so much about system I/O any more, and if someone does not know `dup()`,
> then the error message is not very telling. It took me a while to under-
> stand what the code was supposed to do. So it may be helpful to add to
> the error message something like "possible the stderr stream is closed,
> this is not supported". What do you think?

Meh ... it's been like that for ~20 years and you're the first one
to complain, so I'm not inclined to make our translators spend effort
on a HINT message. However, we could reword it to the extent of, say,

elog(WARNING, "duplicating stderr failed after %d successes: %m", used);

which at least reduces the jargon level to something that Unix users
should have heard of.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message FOUTE K. Jaurès 2021-09-01 16:54:29 Re: PostgreSQL 12 - ERROR: invalid attribute number 2 for ad_user_pkey - Urgent
Previous Message Mario Emmenlauer 2021-09-01 15:49:57 Re: dup(0) fails on Ubuntu 20.04 and macOS 10.15 with 13.0

Browse pgsql-hackers by date

  From Date Subject
Next Message Jaime Casanova 2021-09-01 16:05:18 Re: WIP: System Versioned Temporal Table
Previous Message Mario Emmenlauer 2021-09-01 15:49:57 Re: dup(0) fails on Ubuntu 20.04 and macOS 10.15 with 13.0