Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/sys/linux/psignal.c')
-rw-r--r--newlib/libc/sys/linux/psignal.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/newlib/libc/sys/linux/psignal.c b/newlib/libc/sys/linux/psignal.c
new file mode 100644
index 000000000..f5fedc9fa
--- /dev/null
+++ b/newlib/libc/sys/linux/psignal.c
@@ -0,0 +1,15 @@
+/* libc/sys/linux/psignal.c - print signal message to stderr */
+
+/* Copyright 2002, Red Hat Inc. */
+
+#include <stdio.h>
+#include <string.h>
+
+void
+psignal (int sig, const char *s)
+{
+ if (s != NULL)
+ fprintf (stderr, "%s: %s\n", s, strsignal (sig));
+ else
+ fprintf (stderr, "%s\n", strsignal (sig));
+}