summaryrefslogtreecommitdiffstats
path: root/src/bin/dhcp4/main.cc
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2020-02-28 22:04:28 +0100
committerThomas Markwalder <tmark@isc.org>2020-03-04 12:59:52 +0100
commit17580ffc984d264181e177b9d86edfa518f09066 (patch)
tree4314315f9c4fdfa6757b48cfcee17c99025b33a3 /src/bin/dhcp4/main.cc
parent[#1088] updated ChangeLog (diff)
downloadkea-17580ffc984d264181e177b9d86edfa518f09066.tar.xz
kea-17580ffc984d264181e177b9d86edfa518f09066.zip
[#1115] shutdown command exit-value arg, exit w/failure on db loss
Added exit-value argument to shutdown command. kea-dhcpX servers now exit with EXIT_FAILURE status on db loss src/lib/process/daemon.* Daemon::exit_value_, new member with getter/setter src/lib/process/d_controller.* DControllerBase::launch() - now returns getExitValue() DControllerBase::shutdownHandler() - uses exit-value argument to set exit value src/lib/process/tests/daemon_unittest.cc TEST_F(DaemonTest, exitValue) - new test src/bin/agent/main.cc Use launch() return value for exit value. src/bin/agent/tests/ca_controller_unittests.cc TEST_F(CtrlAgentControllerTest, shutdownExitValue) - new test src/bin/d2/main.cc Use launch() return value for exit value. src/bin/d2/tests/d2_command_unittest.cc TEST_F(CtrlChannelD2Test, shutdownExitValue) - new test src/bin/dhcp4/ctrl_dhcp4_srv.* ControlledDhcpv4Srv:: commandShutdownHandler() - handle exit-value argument shutdown(int exit_value) - added exit_value parameter dbReconnect() - call shutdown(EXIT_FAILURE) dbLostCallback() - call shutdown(EXIT_FAILURE) src/bin/dhcp4/dhcp4_srv.* Dhcp4Srv::run() - returns int Daemon::exit_value instead of bool src/bin/dhcp4/main.cc Use run() return value for exit value. src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc TEST_F(CtrlChannelDhcpv4SrvTest, commands) - revamped test src/bin/dhcp6/ctrl_dhcp6_srv.* ControlledDhcpv6Srv:: commandShutdownHandler() - use exit-value argument to set exit value shutdown(int exit_value) - added exit_value parameter dbReconnect() - call shutdown(EXIT_FAILURE) dbLostCallback() - call shutdown(EXIT_FAILURE) src/bin/dhcp6/dhcp6_srv.* Dhcp6Srv::run() - returns int Daemon::exit_value instead of bool src/bin/dhcp6/main.cc Use run() return value for exit value. src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc TEST_F(CtrlDhcpv6SrvTest, commands) - revamped test
Diffstat (limited to 'src/bin/dhcp4/main.cc')
-rw-r--r--src/bin/dhcp4/main.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/dhcp4/main.cc b/src/bin/dhcp4/main.cc
index b8cd9a5205..9d72cebaab 100644
--- a/src/bin/dhcp4/main.cc
+++ b/src/bin/dhcp4/main.cc
@@ -269,7 +269,7 @@ main(int argc, char* argv[]) {
LOG_INFO(dhcp4_logger, DHCP4_STARTED).arg(VERSION);
// And run the main loop of the server.
- server.run();
+ ret = server.run();
LOG_INFO(dhcp4_logger, DHCP4_SHUTDOWN);