summary refs log tree commit diff
path: root/stdio-common
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common')
-rw-r--r--stdio-common/psignal.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/stdio-common/psignal.c b/stdio-common/psignal.c
index 0764af536b..3a75224b78 100644
--- a/stdio-common/psignal.c
+++ b/stdio-common/psignal.c
@@ -57,7 +57,13 @@ psignal (int sig, const char *s)
     {
       char *buf;
 
-      (void) __asprintf (&buf, _("%s%sUnknown signal %d\n"), s, colon, sig);
+      if (__asprintf (&buf, _("%s%sUnknown signal %d\n"), s, colon, sig) < 0)
+	{
+	  if (_IO_fwide (stderr, 0) > 0)
+	    (void) __fwprintf (stderr, L"%s%s%s\n", s, colon, _("Unknown signal"));
+	  else
+	    (void) fprintf (stderr, "%s%s%s\n", s, colon, _("Unknown signal"));
+	}
 
       if (_IO_fwide (stderr, 0) > 0)
 	(void) __fwprintf (stderr, L"%s",  buf);