]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Replace use of sys_siglist[] with strsignal().
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 16 Jul 2020 02:05:13 +0000 (22:05 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 16 Jul 2020 02:05:13 +0000 (22:05 -0400)
commitd61dcccaf92618b06b232c1436c0fae3205aba98
tree06d03e3ad72c14d697df503d803953e50bdd14ed
parent18ec25412c08e6bdc42c0179a2b42d816d12fbbd
Replace use of sys_siglist[] with strsignal().

This commit back-patches the v12-era commits a73d08319cc92cca43,
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
12 files changed:
configure
configure.in
src/backend/postmaster/pgarch.c
src/backend/postmaster/postmaster.c
src/bin/pg_basebackup/pg_basebackup.c
src/common/wait_error.c
src/include/pg_config.h.in
src/include/pg_config.h.win32
src/include/port.h
src/port/Makefile
src/port/pgstrsignal.c [new file with mode: 0644]
src/test/regress/pg_regress.c