author | Michael Krelin <hacker@klever.net> | 2004-07-21 20:59:33 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2004-07-21 20:59:33 (UTC) |
commit | 4b2d32eca61f62bfd1370fd64254514152ecd23c (patch) (unidiff) | |
tree | ab7d32f4b1572a33d1384d3127495feaea3978b4 /src | |
parent | 5e437102c59f4544e3803598eabcb643d403272d (diff) | |
download | dudki-4b2d32eca61f62bfd1370fd64254514152ecd23c.zip dudki-4b2d32eca61f62bfd1370fd64254514152ecd23c.tar.gz dudki-4b2d32eca61f62bfd1370fd64254514152ecd23c.tar.bz2 |
more civilized restart, bumped up version.
-rw-r--r-- | src/dudki.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dudki.cc b/src/dudki.cc index b769109..b4e95a7 100644 --- a/src/dudki.cc +++ b/src/dudki.cc | |||
@@ -23,2 +23,3 @@ using namespace std; | |||
23 | bool finishing = false; | 23 | bool finishing = false; |
24 | bool restarting = false; | ||
24 | static char **_argv = NULL; | 25 | static char **_argv = NULL; |
@@ -31,3 +32,3 @@ static void sighup_handler(int signum) { | |||
31 | syslog(LOG_NOTICE,"SUGHUP received, reloading."); | 32 | syslog(LOG_NOTICE,"SUGHUP received, reloading."); |
32 | execvp(_argv[0],_argv); | 33 | restarting = finishing = true; |
33 | } | 34 | } |
@@ -239,2 +240,4 @@ int main(int argc,char **argv) { | |||
239 | } | 240 | } |
241 | if(restarting) | ||
242 | execvp(_argv[0],_argv); | ||
240 | } | 243 | } |