summaryrefslogtreecommitdiff
path: root/src/signal/psignal.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-06-08 16:41:44 -0400
committerRich Felker <dalias@aerifal.cx>2011-06-08 16:41:44 -0400
commitecc0f5138dd784eadea66f5b244515a98b381d39 (patch)
tree7449ef7c98b7b3a42dd406facc846ac85719ae86 /src/signal/psignal.c
parente0037efc1253e190c7c75f74e5a05333fdd807bb (diff)
downloadmusl-ecc0f5138dd784eadea66f5b244515a98b381d39.tar.gz
musl-ecc0f5138dd784eadea66f5b244515a98b381d39.tar.bz2
musl-ecc0f5138dd784eadea66f5b244515a98b381d39.tar.xz
musl-ecc0f5138dd784eadea66f5b244515a98b381d39.zip
implement psignal and psiginfo
Diffstat (limited to 'src/signal/psignal.c')
-rw-r--r--src/signal/psignal.c10
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);
+}