]> 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)
commit9e043d93c84364e02fd81e9b26f46277c232f1b4
treecb1798920f6b5e1673f5f1c81d992afdc18ef026
parent14fe8041395cdfaf05c736911080982d021c5e9d
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