aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/util.cpp2
-rw-r--r--src/common/util.h12
2 files changed, 7 insertions, 7 deletions
diff --git a/src/common/util.cpp b/src/common/util.cpp
index 4c1b44004..371b55add 100644
--- a/src/common/util.cpp
+++ b/src/common/util.cpp
@@ -48,7 +48,7 @@ using namespace epee;
namespace tools
{
- std::function<void(void)> signal_handler::m_handler;
+ std::function<void(int)> signal_handler::m_handler;
#ifdef WIN32
std::string get_windows_version_display_string()
diff --git a/src/common/util.h b/src/common/util.h
index 236a0b6f0..937f7e44d 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -130,7 +130,7 @@ namespace tools
{
if (CTRL_C_EVENT == type || CTRL_BREAK_EVENT == type)
{
- handle_signal();
+ handle_signal(type);
}
else
{
@@ -141,21 +141,21 @@ namespace tools
}
#else
/*! \brief handler for NIX */
- static void posix_handler(int /*type*/)
+ static void posix_handler(int type)
{
- handle_signal();
+ handle_signal(type);
}
#endif
/*! \brief calles m_handler */
- static void handle_signal()
+ static void handle_signal(int type)
{
static std::mutex m_mutex;
std::unique_lock<std::mutex> lock(m_mutex);
- m_handler();
+ m_handler(type);
}
/*! \brief where the installed handler is stored */
- static std::function<void(void)> m_handler;
+ static std::function<void(int)> m_handler;
};
}