+
+static void buff_trim(buff_t* b)
+{
+ xbt_str_trim(b->data," ");
+ b->used = strlen(b->data);
+}
+
+typedef struct s_signal_entry
+{
+ const char* name;
+ int number;
+}s_signal_entry_t,* signal_entry_t;
+
+static const s_signal_entry_t signals[] =
+{
+ {"SIGHUP" ,1},
+ {"SIGINT" ,2},
+ {"SIGQUIT" ,3},
+ {"SIGILL" ,4},
+ {"SIGTRAP" ,5},
+ {"SIGABRT" ,6},
+ {"SIGEMT" ,7},
+ {"SIGFPE" ,8},
+ {"SIGKILL" ,9},
+ {"SIGBUS" ,10},
+ {"SIGSEGV" ,11},
+ {"SIGSYS" ,12},
+ {"SIGPIPE" ,13},
+ {"SIGALRM" ,14},
+ {"SIGTERM" ,15},
+ {"SIGURG" ,16},
+ {"SIGSTOP" ,17},
+ {"SIGTSTP" ,18},
+ {"SIGCONT" ,19},
+ {"SIGCHLD" ,20},
+ {"SIGTTIN" ,21},
+ {"SIGTTOU" ,22},
+ {"SIGIO" ,23},
+ {"SIGXCPU" ,24},
+ {"SIGXFSZ" ,25},
+ {"SIGVTALRM",26},
+ {"SIGPROF" ,27},
+ {"SIGWINCH" ,28},
+ {"SIGINFO" ,29},
+ {"SIGUSR1" ,30},
+ {"SIGUSR2" ,31}
+};
+
+#define SIGMAX 31
+#define SIGUNKNW SIGMAX + 1
+
+/* returns the name of the signal from it number */
+const char*
+signal_name(unsigned int number);
+