diff options
Diffstat (limited to 'jim-signal.c')
-rw-r--r-- | jim-signal.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/jim-signal.c b/jim-signal.c index 09a0f7a..e841d61 100644 --- a/jim-signal.c +++ b/jim-signal.c @@ -108,6 +108,16 @@ const char *Jim_SignalId(int sig) return "unknown signal"; } +const char *Jim_SignalName(int sig) +{ +#ifdef HAVE_SYS_SIGLIST + if (sig >= 0 && sig < NSIG) { + return sys_siglist[sig]; + } +#endif + return Jim_SignalId(sig); +} + /** * Given the name of a signal, returns the signal value if found, * or returns -1 (and sets an error) if not found. |