diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-06-08 16:41:44 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-06-08 16:41:44 -0400 |
commit | ecc0f5138dd784eadea66f5b244515a98b381d39 (patch) | |
tree | 7449ef7c98b7b3a42dd406facc846ac85719ae86 /src/signal/psiginfo.c | |
parent | e0037efc1253e190c7c75f74e5a05333fdd807bb (diff) | |
download | musl-ecc0f5138dd784eadea66f5b244515a98b381d39.zip musl-ecc0f5138dd784eadea66f5b244515a98b381d39.tar.gz musl-ecc0f5138dd784eadea66f5b244515a98b381d39.tar.bz2 |
implement psignal and psiginfo
Diffstat (limited to 'src/signal/psiginfo.c')
-rw-r--r-- | src/signal/psiginfo.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/signal/psiginfo.c b/src/signal/psiginfo.c new file mode 100644 index 0000000..fa46d2b --- /dev/null +++ b/src/signal/psiginfo.c @@ -0,0 +1,10 @@ +#include <stdio.h> +#include <string.h> +#include <signal.h> + +void psiginfo(siginfo_t *si, const char *msg) +{ + char *s = strsignal(si->si_signo); + if (msg) fprintf(stderr, "%s: %s\n", msg, s); + else fprintf(stderr, "%s\n", s); +} |