Previously strtosig() detected the signal count at runtime, mutating
the value of a static global variable. The signals were detected using
\#ifdef directives and were taken from <signal.h> on my OpenBSD install.
Extract the common signals that should be found in every POSIX
implementation [1] and remove any vendor-specific signals with
possibly differing names across implementations.
Do not detect the signal count at runtime anymore. Keep it in a static
const variable which holds the signal count known _at compile time_.
Fix the logic error in the for loop in strtosig().
[1]: <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html>
stands for "string bounds copy". Some systems like macOS include their
very own version of strlcpy and testing for that would require some
bloat like gnu automake so I'm just gonna rename it to prevent any
future conflicts. I only test on Linux and OpenBSD anyway. ;)
pidof is, as far as I know, only available on Linux. pgrep is much
more portable (even though it is not part of a standard), and can
be found in the base system on most BSDs and included in most
Linux distributions as part of the procps-ng package.