diff options
Diffstat (limited to 'src/signal/psignal.c')
-rw-r--r-- | src/signal/psignal.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/signal/psignal.c b/src/signal/psignal.c new file mode 100644 index 00000000..02f1c760 --- /dev/null +++ b/src/signal/psignal.c @@ -0,0 +1,10 @@ +#include <stdio.h> +#include <string.h> +#include <signal.h> + +void psignal(int sig, const char *msg) +{ + char *s = strsignal(sig); + if (msg) fprintf(stderr, "%s: %s\n", msg, s); + else fprintf(stderr, "%s\n", s); +} |