aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistbuildbuffers.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-12-16 19:38:57 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2018-12-16 19:38:57 -0500
commita73d08319537d807a520a72bc5bd17279672c3de (patch)
treecfa3fb18b19556da1cba6611eb9cc6f3484543cf /src/backend/access/gist/gistbuildbuffers.c
parent16fda4b853cd5bc07c450303a465ed9d451c7b47 (diff)
downloadpostgresql-a73d08319537d807a520a72bc5bd17279672c3de.tar.gz
postgresql-a73d08319537d807a520a72bc5bd17279672c3de.zip
Modernize our code for looking up descriptive strings for Unix signals.
At least as far back as the 2008 spec, POSIX has defined strsignal(3) for looking up descriptive strings for signal numbers. We hadn't gotten the word though, and were still using the crufty old sys_siglist array, which is in no standard even though most Unixen provide it. Aside from not being formally standards-compliant, this was just plain ugly because it involved #ifdef's at every place using the code. To eliminate the #ifdef's, create a portability function pg_strsignal, which wraps strsignal(3) if available and otherwise falls back to sys_siglist[] if available. The set of Unixen with neither API is probably empty these days, but on any platform with neither, you'll just get "unrecognized signal". All extant callers print the numeric signal number too, so no need to work harder than that. Along the way, upgrade pg_basebackup's child-error-exit reporting to match the rest of the system. Discussion: https://postgr.es/m/25758.1544983503@sss.pgh.pa.us
Diffstat (limited to 'src/backend/access/gist/gistbuildbuffers.c')
0 files changed, 0 insertions, 0 deletions