summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/thread
diff options
context:
space:
mode:
authorMarcus Müller <mmueller@gnuradio.org>2020-04-11 00:43:39 +0200
committerMarcus Müller <marcus@hostalia.de>2020-04-13 15:55:41 +0200
commit0f88db1ef0569bf6fcd5e9c843da38d487a6f54b (patch)
tree4c9827377c0e98fe223f39edb0c84c8a49c199e9 /gnuradio-runtime/lib/thread
parentec8a92846a388cb0d2982822ea1961910cd552f8 (diff)
runtime: replace stderr logging by calls to GR's logging facilties
Diffstat (limited to 'gnuradio-runtime/lib/thread')
-rw-r--r--gnuradio-runtime/lib/thread/thread_body_wrapper.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/gnuradio-runtime/lib/thread/thread_body_wrapper.cc b/gnuradio-runtime/lib/thread/thread_body_wrapper.cc
index 53fac78d93..b82623475b 100644
--- a/gnuradio-runtime/lib/thread/thread_body_wrapper.cc
+++ b/gnuradio-runtime/lib/thread/thread_body_wrapper.cc
@@ -12,6 +12,7 @@
#include <config.h>
#endif
+#include <gnuradio/logger.h>
#include <gnuradio/thread/thread_body_wrapper.h>
#ifdef HAVE_SIGNAL_H
@@ -63,8 +64,13 @@ void mask_signals()
sigaddset(&new_set, SIGXFSZ);
#endif
r = pthread_sigmask(SIG_BLOCK, &new_set, 0);
- if (r != 0)
- perror("pthread_sigmask");
+ if (r != 0) {
+ // FIXME use predefined loggers
+ gr::logger_ptr logger, debug_logger;
+ gr::configure_default_loggers(
+ logger, debug_logger, "thread_body_wrapper::mask_signals");
+ GR_LOG_ERROR(logger, boost::format("pthread_sigmask: %s") % strerror(errno));
+ }
}
#else