Index: ntrib/signalent.h.sh
===================================================================
--- contrib/signalent.h.sh	(revision 235)
+++ 	(revision )
@@ -1,9 +1,0 @@
-#!/bin/bash
-
-# The goal here is to regenerate a file signalent.h if it is missing. This file contains only a list of the signals abbreviations.
-
-# This script needs to be improved...
-cpp -dM /usr/include/signal.h \
-	| tr -s '\t ' '  '  \
-	| sed 's:#define \(SIG[A-Z]\+[0-9]*\) \([0-9]\+\):\2 \1:p;d' \
-	| sort -n --unique
Index: freeDiameter/main.c
===================================================================
--- freeDiameter/main.c	(revision 235)
+++ freeDiameter/main.c	(revision 236)
@@ -321,5 +321,5 @@
 	TRACE_ENTRY("%d", signal);
 	
-	TRACE_DEBUG(INFO, "Received signal %s (%d), exiting", SIGNALSTR(signal), signal);
+	TRACE_DEBUG(INFO, "Received signal %s (%d), exiting", fd_sig_abbrev(signal), signal);
 
 	CHECK_FCT_DO( fd_event_send(fd_g_config->cnf_main_ev, FDEV_TERMINATE, 0, NULL), exit(2) );
Index: freeDiameter/tests/tests.h
===================================================================
--- freeDiameter/tests/tests.h	(revision 235)
+++ freeDiameter/tests/tests.h	(revision 236)
@@ -57,4 +57,5 @@
 #include <time.h>
 #include <libgen.h>
+#include <signal.h>
 
 /* Define the return code values */
@@ -116,4 +117,9 @@
 }
 
+static void test_timeout(int signal)
+{
+	FAILTEST("The timeout (" _stringize(TEST_TIMEOUT) " sec) was reached. Use -n or change TEST_TIMEOUT if the test needs more time to execute.");
+}
+
 static inline void parse_cmdline(int argc, char * argv[]) {
 	int c;
@@ -138,6 +144,8 @@
 	}
 	fd_g_debug_lvl = (test_verbo > 0) ? (test_verbo - 1) : 0;
-	if (!no_timeout)
+	if (!no_timeout) {
 		alarm(TEST_TIMEOUT);
+		fd_sig_register(SIGALRM, "Test.harness", test_timeout);
+	}
 }
  
Index: include/freeDiameter/CMakeLists.txt
===================================================================
--- include/freeDiameter/CMakeLists.txt	(revision 168)
+++ include/freeDiameter/CMakeLists.txt	(revision 236)
@@ -90,7 +90,4 @@
 CHECK_INCLUDE_FILES (malloc.h HAVE_MALLOC_H)
 
-# signalent.h ? -- found in strace distrib; just for nice signal names...
-CHECK_INCLUDE_FILES (signalent.h HAVE_SIGNALENT_H)
-
 # The default configuration file name
 IF (NOT DEFAULT_CONF_FILE)
Index: include/freeDiameter/libfreeDiameter.h
===================================================================
--- include/freeDiameter/libfreeDiameter.h	(revision 235)
+++ include/freeDiameter/libfreeDiameter.h	(revision 236)
@@ -590,11 +590,5 @@
 
 /* Name of signals */
-#ifdef HAVE_SIGNALENT_H
-extern const char *const fd_sig_str[];
-extern const int fd_sig_nstr;
-# define SIGNALSTR(sig) (((sig) < fd_sig_nstr) ? fd_sig_str[(sig)] : "[unknown signal]")
-#else /* HAVE_SIGNALENT_H */
-# define SIGNALSTR(sig) ("[no sig names]")
-#endif /* HAVE_SIGNALENT_H */
+const char * fd_sig_abbrev(int signal);
 
 
Index: libfreeDiameter/signal.c
===================================================================
--- libfreeDiameter/signal.c	(revision 235)
+++ libfreeDiameter/signal.c	(revision 236)
@@ -38,12 +38,4 @@
 #include <signal.h>
 
-/* List of signal names */
-#ifdef HAVE_SIGNALENT_H
-const char *const fd_sig_str[] = {
-# include "signalent.h"
-};
-const int fd_sig_nstr = sizeof fd_sig_str / sizeof fd_sig_str[0];
-#endif /* HAVE_SIGNALENT_H */
-
 /* A structure to hold the registered signal handlers */
 struct sig_hdl {
@@ -65,4 +57,7 @@
 static int sig_initialized = 0;
 
+/* signals short names list */
+static int abbrevs_init(void);
+
 /* Initialize the support for signals */
 int fd_sig_init(void)
@@ -74,4 +69,7 @@
 	if (sig_initialized)
 		return 0;
+	
+	/* Initialize the list of abbreviations */
+	CHECK_FCT(abbrevs_init());
 	
 	/* Block all signals from the current thread and all its future children, so that signals are delivered only to our sig_hdl->sig_thr */
@@ -97,5 +95,5 @@
 	
 	/* Name this thread */
-	snprintf(buf, sizeof(buf), "cb %d:%s:%s", me->signal, SIGNALSTR(me->signal), me->modname);
+	snprintf(buf, sizeof(buf), "cb %d:%s:%s", me->signal, fd_sig_abbrev(me->signal), me->modname);
 	fd_log_threadname ( buf );
 	
@@ -121,5 +119,5 @@
 	
 	/* Name this thread */
-	snprintf(buf, sizeof(buf), "catch %d:%s:%s", me->signal, SIGNALSTR(me->signal), me->modname);
+	snprintf(buf, sizeof(buf), "catch %d:%s:%s", me->signal, fd_sig_abbrev(me->signal), me->modname);
 	fd_log_threadname ( buf );
 	
@@ -144,5 +142,5 @@
 	
 	/* An error occurred... What should we do ? */
-	TRACE_DEBUG(INFO, "!!! ERROR !!! The signal catcher for %d:%s:%s is terminating!", me->signal, SIGNALSTR(me->signal), me->modname);
+	TRACE_DEBUG(INFO, "!!! ERROR !!! The signal catcher for %d:%s:%s is terminating!", me->signal, fd_sig_abbrev(me->signal), me->modname);
 	
 	/* Better way to handle this ? */
@@ -180,5 +178,5 @@
 		if (nh->signal == signal) {
 			matched = 1;
-			TRACE_DEBUG(INFO, "Signal %d (%s) is already registered by module '%s'", signal, SIGNALSTR(signal), nh->modname);
+			TRACE_DEBUG(INFO, "Signal %d (%s) is already registered by module '%s'", signal, fd_sig_abbrev(signal), nh->modname);
 		}
 		break;
@@ -216,5 +214,5 @@
 		struct sig_hdl * h = (struct sig_hdl *)li;
 		
-		fd_log_debug("%*s  - sig %*d (%s) => %p in module %s\n", indent, "", 2, h->signal, SIGNALSTR(h->signal), h->sig_hdl, h->modname);
+		fd_log_debug("%*s  - sig %*d (%s) => %p in module %s\n", indent, "", 2, h->signal, fd_sig_abbrev(h->signal), h->sig_hdl, h->modname);
 	}
 	CHECK_POSIX_DO(pthread_mutex_unlock(&sig_hdl_lock), /* continue */);
@@ -289,2 +287,170 @@
 	return;
 }
+
+
+/**************************************************************************************/
+
+static char **abbrevs;
+static size_t abbrevs_nr = 0;
+
+/* Initialize the array of signals */
+static int abbrevs_init(void)
+{
+	int i;
+	
+	#define SIGNAL_MAX_LIMIT	100 /* Do not save signals with value > this */
+
+	/* The raw list of signals in the system -- might be incomplete, add any signal you need */
+	struct sig_abb_raw {
+		int	 sig;
+		char 	*name;
+	} abbrevs_raw[] = {
+		{ 0, "[unknown signal]" }
+	#define RAW_SIGNAL( _sig ) ,{ _sig, #_sig }
+	#ifdef SIGBUS
+		RAW_SIGNAL( SIGBUS )
+	#endif /* SIGBUS */
+	#ifdef SIGTTIN
+		RAW_SIGNAL( SIGTTIN )
+	#endif /* SIGTTIN */
+	#ifdef SIGTTOU
+		RAW_SIGNAL( SIGTTOU )
+	#endif /* SIGTTOU */
+	#ifdef SIGPROF
+		RAW_SIGNAL( SIGPROF )
+	#endif /* SIGPROF */
+	#ifdef SIGALRM
+		RAW_SIGNAL( SIGALRM )
+	#endif /* SIGALRM */
+	#ifdef SIGFPE
+		RAW_SIGNAL( SIGFPE )
+	#endif /* SIGFPE */
+	#ifdef SIGSTKFLT
+		RAW_SIGNAL( SIGSTKFLT )
+	#endif /* SIGSTKFLT */
+	#ifdef SIGSTKSZ
+		RAW_SIGNAL( SIGSTKSZ )
+	#endif /* SIGSTKSZ */
+	#ifdef SIGUSR1
+		RAW_SIGNAL( SIGUSR1 )
+	#endif /* SIGUSR1 */
+	#ifdef SIGURG
+		RAW_SIGNAL( SIGURG )
+	#endif /* SIGURG */
+	#ifdef SIGIO
+		RAW_SIGNAL( SIGIO )
+	#endif /* SIGIO */
+	#ifdef SIGQUIT
+		RAW_SIGNAL( SIGQUIT )
+	#endif /* SIGQUIT */
+	#ifdef SIGABRT
+		RAW_SIGNAL( SIGABRT )
+	#endif /* SIGABRT */
+	#ifdef SIGTRAP
+		RAW_SIGNAL( SIGTRAP )
+	#endif /* SIGTRAP */
+	#ifdef SIGVTALRM
+		RAW_SIGNAL( SIGVTALRM )
+	#endif /* SIGVTALRM */
+	#ifdef SIGSEGV
+		RAW_SIGNAL( SIGSEGV )
+	#endif /* SIGSEGV */
+	#ifdef SIGCONT
+		RAW_SIGNAL( SIGCONT )
+	#endif /* SIGCONT */
+	#ifdef SIGPIPE
+		RAW_SIGNAL( SIGPIPE )
+	#endif /* SIGPIPE */
+	#ifdef SIGWINCH
+		RAW_SIGNAL( SIGWINCH )
+	#endif /* SIGWINCH */
+	#ifdef SIGXFSZ
+		RAW_SIGNAL( SIGXFSZ )
+	#endif /* SIGXFSZ */
+	#ifdef SIGHUP
+		RAW_SIGNAL( SIGHUP )
+	#endif /* SIGHUP */
+	#ifdef SIGCHLD
+		RAW_SIGNAL( SIGCHLD )
+	#endif /* SIGCHLD */
+	#ifdef SIGSYS
+		RAW_SIGNAL( SIGSYS )
+	#endif /* SIGSYS */
+	#ifdef SIGSTOP
+		RAW_SIGNAL( SIGSTOP )
+	#endif /* SIGSTOP */
+	#ifdef SIGUSR2
+		RAW_SIGNAL( SIGUSR2 )
+	#endif /* SIGUSR2 */
+	#ifdef SIGTSTP
+		RAW_SIGNAL( SIGTSTP )
+	#endif /* SIGTSTP */
+	#ifdef SIGKILL
+		RAW_SIGNAL( SIGKILL )
+	#endif /* SIGKILL */
+	#ifdef SIGXCPU
+		RAW_SIGNAL( SIGXCPU )
+	#endif /* SIGXCPU */
+	#ifdef SIGUNUSED
+		RAW_SIGNAL( SIGUNUSED )
+	#endif /* SIGUNUSED */
+	#ifdef SIGPWR
+		RAW_SIGNAL( SIGPWR )
+	#endif /* SIGPWR */
+	#ifdef SIGILL
+		RAW_SIGNAL( SIGILL )
+	#endif /* SIGILL */
+	#ifdef SIGINT
+		RAW_SIGNAL( SIGINT )
+	#endif /* SIGINT */
+	#ifdef SIGIOT
+		RAW_SIGNAL( SIGIOT )
+	#endif /* SIGIOT */
+	#ifdef SIGTERM
+		RAW_SIGNAL( SIGTERM )
+	#endif /* SIGTERM */
+	};
+
+	TRACE_ENTRY("");
+	
+	/* First pass: find the highest signal number */
+	for (i=0; i < sizeof(abbrevs_raw)/sizeof(abbrevs_raw[0]); i++) {
+		if (abbrevs_raw[i].sig > SIGNAL_MAX_LIMIT) {
+			TRACE_DEBUG(ANNOYING, "Ignoring signal %s (%d), increase SIGNAL_MAX_LIMIT if you want it included", abbrevs_raw[i].name, abbrevs_raw[i].sig);
+			continue;
+		}
+		if (abbrevs_raw[i].sig > abbrevs_nr)
+			abbrevs_nr = abbrevs_raw[i].sig;
+	}
+	
+	/* Now, alloc the array */
+	abbrevs_nr++; /* 0-based */
+	CHECK_MALLOC( abbrevs = calloc( abbrevs_nr, sizeof(char *) ) );
+	
+	/* Second pass: add all the signals in the array */
+	for (i=0; i < sizeof(abbrevs_raw)/sizeof(abbrevs_raw[0]); i++) {
+		if (abbrevs_raw[i].sig > SIGNAL_MAX_LIMIT)
+			continue;
+		
+		if (abbrevs[abbrevs_raw[i].sig] == NULL)
+			abbrevs[abbrevs_raw[i].sig] = abbrevs_raw[i].name;
+	}
+	
+	/* Third pass: Set all missing signals to the undef value */
+	for (i=0; i < abbrevs_nr; i++) {
+		if (abbrevs[i] == NULL)
+			abbrevs[i] = abbrevs_raw[0].name;
+	}
+	
+	/* Done! */
+	return 0;
+}
+
+/* Names of signals */
+const char * fd_sig_abbrev(int signal)
+{
+	if (signal < abbrevs_nr)
+		return abbrevs[signal];
+	return abbrevs[0];
+}
+
