From 0324595d00170bc1248d835f8527e62181c9afe3 Mon Sep 17 00:00:00 2001 From: jtaub <65861679+jtaub@users.noreply.github.com> Date: Tue, 8 Oct 2024 18:45:27 -0400 Subject: [PATCH] replace all usage of sys_siglist with strsignal (#593) --- aws/utils/signal_handler.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/aws/utils/signal_handler.cc b/aws/utils/signal_handler.cc index 4d0d2478..b58ab0ea 100644 --- a/aws/utils/signal_handler.cc +++ b/aws/utils/signal_handler.cc @@ -33,7 +33,7 @@ void write_signal_description(int signal) { WRITE_NUM_CHECKED(signal, "Negative Signal") } else { if (signal_message_sizes[signal]) { - write(STDERR_FILENO, sys_siglist[signal], signal_message_sizes[signal]); + write(STDERR_FILENO, strsignal(signal), signal_message_sizes[signal]); } else { WRITE_MESSAGE("Signal had NULL message.") } @@ -114,8 +114,9 @@ namespace aws { aws::utils::backtrace::initialize(exe); signal_message_sizes[0] = 0; for (int i = 1; i < NSIG; ++i) { - if (sys_siglist[i]) { - signal_message_sizes[i] = strlen(sys_siglist[i]); + const auto signal = strsignal(i); + if (signal) { + signal_message_sizes[i] = strlen(signal); } } sigset_t mask;