From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Replace use of sys_siglist[] with strsignal().
Date: Thu, 16 Jul 2020 02:06:33 +0000
Message-ID: <E1jvtI9-0007iq-L8@gemulon.postgresql.org> (raw)
Replace use of sys_siglist[] with strsignal().
This commit back-patches the v12-era commits a73d08319, cc92cca43,
and 7570df0f3 into supported pre-v12 branches. The net effect is to
eliminate our former dependency on the never-standard sys_siglist[]
array, instead using POSIX-standard strsignal(3).
What motivates doing this now is that glibc just removed sys_siglist[]
from the set of symbols available to newly-built programs. While our
code can survive without sys_siglist[], it then fails to print any
description of the signal that killed a child process, which is a
non-negligible loss of friendliness. We can expect that people will
be wanting to build the back branches on platforms that include this
change, so we need to do something.
Since strsignal(3) has existed for quite a long time, and we've not
had any trouble with these patches so far in v12, it seems safe to
back-patch into older branches.
Discussion: https://postgr.es/m/3179114.1594853308@sss.pgh.pa.us
Branch
------
REL9_6_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/9e043d93c84364e02fd81e9b26f46277c232f1b4
Modified Files
--------------
configure | 20 +----------
configure.in | 9 +----
src/backend/postmaster/pgarch.c | 11 ++----
src/backend/postmaster/postmaster.c | 16 +++------
src/bin/pg_basebackup/pg_basebackup.c | 18 ++++------
src/common/wait_error.c | 16 +++------
src/include/pg_config.h.in | 7 ++--
src/include/pg_config.h.win32 | 3 ++
src/include/port.h | 3 ++
src/port/Makefile | 2 +-
src/port/pgstrsignal.c | 64 +++++++++++++++++++++++++++++++++++
src/test/regress/pg_regress.c | 9 ++---
12 files changed, 94 insertions(+), 84 deletions(-)
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-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Replace use of sys_siglist[] with strsignal().
In-Reply-To: <E1jvtI9-0007iq-L8@gemulon.postgresql.org>
References: <E1jvtI9-0007iq-L8@gemulon.postgresql.org>
* 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