Skip to content

Commit

Permalink
replace all usage of sys_siglist with strsignal (#593)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtaub authored Oct 8, 2024
1 parent e450359 commit 0324595
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions aws/utils/signal_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
}
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 0324595

Please sign in to comment.