summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/local_sighandler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-runtime/lib/local_sighandler.cc')
-rw-r--r--gnuradio-runtime/lib/local_sighandler.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/gnuradio-runtime/lib/local_sighandler.cc b/gnuradio-runtime/lib/local_sighandler.cc
index 2f2b72063b..a50dab79c2 100644
--- a/gnuradio-runtime/lib/local_sighandler.cc
+++ b/gnuradio-runtime/lib/local_sighandler.cc
@@ -31,8 +31,10 @@ local_sighandler::local_sighandler(int signum, void (*new_handler)(int))
sigemptyset(&new_action.sa_mask);
new_action.sa_flags = 0;
+ gr::configure_default_loggers(d_logger, d_debug_logger, "local_sighandler");
if (sigaction(d_signum, &new_action, &d_old_action) < 0) {
- perror("sigaction (install new)");
+ GR_LOG_ERROR(d_logger,
+ boost::format("sigaction (install new): %s") % strerror(errno))
throw std::runtime_error("sigaction");
}
#endif
@@ -42,7 +44,8 @@ local_sighandler::~local_sighandler() noexcept(false)
{
#ifdef HAVE_SIGACTION
if (sigaction(d_signum, &d_old_action, 0) < 0) {
- perror("sigaction (restore old)");
+ GR_LOG_ERROR(d_logger,
+ boost::format("sigaction (restore old): %s") % strerror(errno))
throw std::runtime_error("sigaction");
}
#endif