Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR removes the usage of the sys_siglist, which was removed in glibc 2.32, causing this project to fail to build on recent Linux distros.
I based my approach off an existing project's bugfix (replace
sys_siglist[sig]
withstrsignal(sig)
). The documentation for the removal ofsys_siglist
is in the glibc 2.32 release notes (2020-08).The usage of sys_siglist in this program is very minimal, so in-depth analysis is probably overkill. But I looked deeper anyway...
Looking at the glibc 2.32 release notes, it appears there are multiple functions returning different types of names, but
strsignal
is good enough for this case.Looking at the strsignal manpage... sigh it's not thread-safe, and the return value may be null for unrecognized signals on OSes other than Linux. It doesn't matter in this case though, since we're on Linux and hopefully all signals are recognized.
I found a source saying that there are no known OSes with sys_siglist but not strsignal, so this change should not reduce compatibility with any versions of Linux.
(I was unable to make debugme actually work on Arch Linux though. gdb never triggered when an app segfaulted. Perhaps drkonqi is interfering?)
Fixes #3.