diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-10-03 20:33:39 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-10-03 20:33:39 +0200 |
commit | 59b92b00c2f2bf4cc4798b6478b2566ddcbc8da5 (patch) | |
tree | 8ffb508fdd4439ccbf940424626f6f844985901b | |
parent | 14f692c2ae784e86218b1696e9af7e8664ee0f82 (diff) | |
parent | 8cec95b777f9e52efceb558f47804572b9752b88 (diff) | |
download | dabmux-59b92b00c2f2bf4cc4798b6478b2566ddcbc8da5.tar.gz dabmux-59b92b00c2f2bf4cc4798b6478b2566ddcbc8da5.tar.bz2 dabmux-59b92b00c2f2bf4cc4798b6478b2566ddcbc8da5.zip |
Merge next into servicelinking
-rw-r--r-- | src/DabMux.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/DabMux.cpp b/src/DabMux.cpp index 9699ea6..689b762 100644 --- a/src/DabMux.cpp +++ b/src/DabMux.cpp @@ -139,37 +139,40 @@ using boost::property_tree::ptree_error; volatile sig_atomic_t running = 1; +/* We are not allowed to use etiLog in the signal handler, + * because etiLog uses mutexes + */ void signalHandler(int signum) { #ifdef _WIN32 - etiLog.log(debug, "\npid: %i\n", _getpid()); + fprintf(stderr, "\npid: %i\n", _getpid()); #else - etiLog.log(debug, "\npid: %i, ppid: %i\n", getpid(), getppid()); + fprintf(stderr, "\npid: %i, ppid: %i\n", getpid(), getppid()); #endif #define SIG_MSG "Signal received: " switch (signum) { #ifndef _WIN32 case SIGHUP: - etiLog.log(debug, SIG_MSG "SIGHUP\n"); + fprintf(stderr, SIG_MSG "SIGHUP\n"); break; case SIGQUIT: - etiLog.log(debug, SIG_MSG "SIGQUIT\n"); + fprintf(stderr, SIG_MSG "SIGQUIT\n"); break; case SIGPIPE: - etiLog.log(debug, SIG_MSG "SIGPIPE\n"); + fprintf(stderr, SIG_MSG "SIGPIPE\n"); return; break; #endif case SIGINT: - etiLog.log(debug, SIG_MSG "SIGINT\n"); + fprintf(stderr, SIG_MSG "SIGINT\n"); break; case SIGTERM: - etiLog.log(debug, SIG_MSG "SIGTERM\n"); - etiLog.log(debug, "Exiting software\n"); + fprintf(stderr, SIG_MSG "SIGTERM\n"); + fprintf(stderr, "Exiting software\n"); exit(0); break; default: - etiLog.log(debug, SIG_MSG "number %i\n", signum); + fprintf(stderr, SIG_MSG "number %i\n", signum); } #ifndef _WIN32 killpg(0, SIGPIPE); |