bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sig2str: add more signals


From: Bruno Haible
Subject: sig2str: add more signals
Date: Sat, 22 Aug 2020 18:02:11 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-186-generic; KDE/5.18.0; x86_64; ; )

Hi Paul,

Here's a proposed patch to add a few more signal names to the list of
signals:
  - SIGCPUFAIL exists on AIX. sys_siglist description: "CPU Failure Predicted"
  - SIGTHR exists on OpenBSD. sys_siglist description: "Thread AST"
    (whatever that may mean).
  - SIGBREAK exists on native Windows.

A few more signals exist on various systems that are not in sys_siglist and
more look like internal signals between system processes. I don't list them
here.

OK to push?

diff --git a/lib/sig2str.c b/lib/sig2str.c
index 905daea..cf7c3bb 100644
--- a/lib/sig2str.c
+++ b/lib/sig2str.c
@@ -189,6 +189,11 @@ static struct numname { int num; char const name[8]; } 
numname_table[] =
     NUMNAME (STKFLT),
 #endif
 
+    /* AIX 7.  */
+#ifdef SIGCPUFAIL
+    NUMNAME (CPUFAIL),
+#endif
+
     /* AIX 5L.  */
 #ifdef SIGDANGER
     NUMNAME (DANGER),
@@ -229,7 +234,12 @@ static struct numname { int num; char const name[8]; } 
numname_table[] =
     NUMNAME (WINDOW),   /* Older name for SIGWINCH.  */
 #endif
 
-    /* BeOS */
+    /* OpenBSD.  */
+#ifdef SIGTHR
+    NUMNAME (THR),
+#endif
+
+    /* BeOS, Haiku */
 #ifdef SIGKILLTHR
     NUMNAME (KILLTHR),
 #endif
@@ -239,6 +249,11 @@ static struct numname { int num; char const name[8]; } 
numname_table[] =
     NUMNAME (DIL),
 #endif
 
+    /* native Windows */
+#ifdef SIGBREAK
+    NUMNAME (BREAK),
+#endif
+
     /* Korn shell and Bash, of uncertain vintage.  */
     { 0, "EXIT" }
   };




reply via email to

[Prev in Thread] Current Thread [Next in Thread]