-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/dudki.cc | 5 |
3 files changed, 8 insertions, 2 deletions
@@ -1,2 +1,5 @@ +0.1 + - initgroups() before executing RestartCommand. + - more civilized restart. 0.0 - Initial release. diff --git a/configure.ac b/configure.ac index 8a2a10b..8521a34 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([dudki], [0.0], [dudki-bugs@klever.net]) +AC_INIT([dudki], [0.1], [dudki-bugs@klever.net]) AC_CONFIG_SRCDIR([src/dudki.cc]) AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE([dist-bzip2]) diff --git a/src/dudki.cc b/src/dudki.cc index b769109..b4e95a7 100644 --- a/src/dudki.cc +++ b/src/dudki.cc @@ -21,6 +21,7 @@ using namespace std; #define PCOPY "Copyright (c) 2004 Klever Group" bool finishing = false; +bool restarting = false; static char **_argv = NULL; static void lethal_signal_handler(int signum) { @@ -29,7 +30,7 @@ static void lethal_signal_handler(int signum) { } static void sighup_handler(int signum) { syslog(LOG_NOTICE,"SUGHUP received, reloading."); - execvp(_argv[0],_argv); + restarting = finishing = true; } void check_herd(configuration& config) { @@ -237,6 +238,8 @@ int main(int argc,char **argv) { check_herd(config); sleep(config.check_interval); } + if(restarting) + execvp(_argv[0],_argv); } break; default: |