From ed07f5a23dd0644d0bbd3f2ddc1cec3b6ce922c6 Mon Sep 17 00:00:00 2001 From: Timo Gurr Date: Tue, 1 Sep 2020 10:03:34 +0200 Subject: [PATCH] Replace deprecated sys_siglist with strsignal Required to work with glibc >= 2.32. https://sourceware.org/pipermail/libc-announce/2020/000029.html The deprecated arrays sys_siglist, _sys_siglist, and sys_sigabbrev are no longer available to newly linked binaries, and their declarations have been removed from . They are exported solely as compatibility symbols to support old binaries. All programs should use strsignal instead. --- CHANGELOG.md | 1 + src/gvmd.c | 4 ++-- src/manage_sql.c | 2 +- src/utils.c | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b80928711..6cac400f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Set file mode creation mask for feed lock handling [#1265](https://github.com/greenbone/gvmd/pull/1265) - Ignore min_qod when getting single results by UUID [#1276](http://github.com/greenbone/gvmd/pull/1276) - Fix alternative options for radio type preferences when exporting a scan_config [#1278](http://github.com/greenbone/gvmd/pull/1278) +- Replace deprecated sys_siglist with strsignal [#1280](https://github.com/greenbone/gvmd/pull/1280) ### Removed diff --git a/src/gvmd.c b/src/gvmd.c index bdcb8e1fe..fe2412e84 100644 --- a/src/gvmd.c +++ b/src/gvmd.c @@ -1334,7 +1334,7 @@ serve_and_schedule () if (termination_signal) { g_debug ("Received %s signal", - sys_siglist[termination_signal]); + strsignal (termination_signal)); cleanup (); /* Raise signal again, to exit with the correct return value. */ setup_signal_handler (termination_signal, SIG_DFL, 0); @@ -1423,7 +1423,7 @@ serve_and_schedule () if (termination_signal) { g_debug ("Received %s signal", - sys_siglist[termination_signal]); + strsignal (termination_signal)); cleanup (); /* Raise signal again, to exit with the correct return value. */ setup_signal_handler (termination_signal, SIG_DFL, 0); diff --git a/src/manage_sql.c b/src/manage_sql.c index 7d1ebc8ba..f9399c506 100644 --- a/src/manage_sql.c +++ b/src/manage_sql.c @@ -16570,7 +16570,7 @@ cleanup_manage_process (gboolean cleanup) void manage_cleanup_process_error (int signal) { - g_debug ("Received %s signal", sys_siglist[signal]); + g_debug ("Received %s signal", strsignal (signal)); if (sql_is_open ()) { if (current_scanner_task) diff --git a/src/utils.c b/src/utils.c index 3b0a31dd5..8c943a824 100644 --- a/src/utils.c +++ b/src/utils.c @@ -800,7 +800,7 @@ setup_signal_handler (int signal, void (*handler) (int), int block) if (sigaction (signal, &action, NULL) == -1) { g_critical ("%s: failed to register %s handler", - __func__, sys_siglist[signal]); + __func__, strsignal (signal)); exit (EXIT_FAILURE); } } @@ -831,7 +831,7 @@ setup_signal_handler_info (int signal, if (sigaction (signal, &action, NULL) == -1) { g_critical ("%s: failed to register %s handler", - __func__, sys_siglist[signal]); + __func__, strsignal (signal)); exit (EXIT_FAILURE); } }