summaryrefslogtreecommitdiffhomepage
path: root/server.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-05-17 15:45:44 +0200
committerRoland Reichwein <mail@reichwein.it>2020-05-17 15:45:44 +0200
commit8e9e332f3809c34d705d0b0754da2fb48566c32f (patch)
tree66aa9102ae273612374b2fda31009e20ead934be /server.cpp
parentf4c9b8da6fae5718b01fa871083f7f72d27b0f96 (diff)
Stop on SIGHUP
Diffstat (limited to 'server.cpp')
-rw-r--r--server.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/server.cpp b/server.cpp
index 5d1609d..51e80ba 100644
--- a/server.cpp
+++ b/server.cpp
@@ -65,7 +65,8 @@ int run_server(Config& config, plugins_container_type& plugins)
boost::asio::io_context ioc{threads};
- boost::asio::signal_set signals(ioc, SIGINT, SIGTERM);
+ // for now, just terminate on SIGINT, SIGHUP and SIGTERM
+ boost::asio::signal_set signals(ioc, SIGINT, SIGTERM, SIGHUP);
signals.async_wait([&](const boost::system::error_code& error, int signal_number){
std::cout << "Terminating via signal " << signal_number << std::endl;
ioc.stop();