main: print the received signal name instead of the signal number
authorFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 1 Mar 2016 10:28:50 +0000 (11:28 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 1 Mar 2016 10:44:54 +0000 (11:44 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
src/main.c

index 93c5c9b..69d6823 100644 (file)
@@ -178,7 +178,11 @@ static void olsr_shutdown(int signo __attribute__ ((unused)))
   struct interface_olsr *ifn;
   int exit_value;
 
+#ifdef __linux__
+  OLSR_PRINTF(1, "Received signal %s - shutting down\n", strsignal(signo));
+#else
   OLSR_PRINTF(1, "Received signal %d - shutting down\n", (int)signo);
+#endif
 
   /* instruct the scheduler to stop */
   olsr_scheduler_stop();