diff options
Diffstat (limited to 'src/libstddjb/sig_name.c')
-rw-r--r-- | src/libstddjb/sig_name.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libstddjb/sig_name.c b/src/libstddjb/sig_name.c new file mode 100644 index 0000000..dd5a456 --- /dev/null +++ b/src/libstddjb/sig_name.c @@ -0,0 +1,11 @@ +/* ISC license. */ + +#include <skalibs/sig.h> +#include "sig-internal.h" + +char const *sig_name (int sig) +{ + register sigtable_t const *p = skalibs_sigtable ; + for (; p->number ; p++) if (sig == p->number) break ; + return p->number ? p->name : "???" ; +} |