pgsql: Replace use of sys_siglist[] with strsignal(). - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Replace use of sys_siglist[] with strsignal().
Date
Msg-id E1jvtI9-0007in-Kh@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0140dec18019e10c7df9f25dc19cab8e93a430c2

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(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: doc: Fix typo
Next
From: Michael Paquier
Date:
Subject: pgsql: Switch pg_test_fsync to use binary mode on Windows