aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-04-15 16:24:40 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-04-15 16:24:40 +0200
commit3132ed535302f0f71a3a0149e2c60ee5aac94b34 (patch)
treebd6f9d3dfd7936cefde25986b61b3c3bfd1b5d64
parentd1409ea6843ec102f8d0ab4bd413b0b92af85071 (diff)
downloaddabmux-3132ed535302f0f71a3a0149e2c60ee5aac94b34.tar.gz
dabmux-3132ed535302f0f71a3a0149e2c60ee5aac94b34.tar.bz2
dabmux-3132ed535302f0f71a3a0149e2c60ee5aac94b34.zip
Make signal handler printouts single-line
-rw-r--r--src/DabMux.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/DabMux.cpp b/src/DabMux.cpp
index 3a4a465..1b4052d 100644
--- a/src/DabMux.cpp
+++ b/src/DabMux.cpp
@@ -148,30 +148,30 @@ void signalHandler(int signum)
#else
etiLog.log(debug, "\npid: %i, ppid: %i\n", getpid(), getppid());
#endif
- etiLog.log(debug, "Signal handler called with signal ");
+#define SIG_MSG "Signal received: "
switch (signum) {
#ifndef _WIN32
case SIGHUP:
- etiLog.log(debug, "SIGHUP\n");
+ etiLog.log(debug, SIG_MSG "SIGHUP\n");
break;
case SIGQUIT:
- etiLog.log(debug, "SIGQUIT\n");
+ etiLog.log(debug, SIG_MSG "SIGQUIT\n");
break;
case SIGPIPE:
- etiLog.log(debug, "SIGPIPE\n");
+ etiLog.log(debug, SIG_MSG "SIGPIPE\n");
return;
break;
#endif
case SIGINT:
- etiLog.log(debug, "SIGINT\n");
+ etiLog.log(debug, SIG_MSG "SIGINT\n");
break;
case SIGTERM:
- etiLog.log(debug, "SIGTERM\n");
+ etiLog.log(debug, SIG_MSG "SIGTERM\n");
etiLog.log(debug, "Exiting software\n");
exit(0);
break;
default:
- etiLog.log(debug, "number %i\n", signum);
+ etiLog.log(debug, SIG_MSG "number %i\n", signum);
}
#ifndef _WIN32
killpg(0, SIGPIPE);