]> 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:12 +0000 (22:05 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 16 Jul 2020 02:05:12 +0000 (22:05 -0400)
commit0140dec18019e10c7df9f25dc19cab8e93a430c2
treefeb6b6702e3c5570ae9ca5a406dcdda52d0d570c
parent23924feca065aa75f0a9edcf78ad953a51405fe8
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