summaryrefslogtreecommitdiffabout
path: root/src
authorMichael Krelin <hacker@klever.net>2006-11-08 14:18:04 (UTC)
committer Michael Krelin <hacker@klever.net>2006-11-08 14:18:04 (UTC)
commitcc0b2a8b1cea327bc0616e0b67dcda0b1fbe83e4 (patch) (unidiff)
tree3d77e76a304eaf1c5b4b54d979d9a41ebd184ed3 /src
parent4148b7ad68f2b5bf83d637bdc5ebbb9f0d2aa869 (diff)
downloaddudki-cc0b2a8b1cea327bc0616e0b67dcda0b1fbe83e4.zip
dudki-cc0b2a8b1cea327bc0616e0b67dcda0b1fbe83e4.tar.gz
dudki-cc0b2a8b1cea327bc0616e0b67dcda0b1fbe83e4.tar.bz2
bumped year
Diffstat (limited to 'src') (more/less context) (ignore whitespace changes)
-rw-r--r--src/dudki.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dudki.cc b/src/dudki.cc
index 3af5372..91a3342 100644
--- a/src/dudki.cc
+++ b/src/dudki.cc
@@ -1,46 +1,46 @@
1#include <unistd.h> 1#include <unistd.h>
2#include <signal.h> 2#include <signal.h>
3#include <syslog.h> 3#include <syslog.h>
4#include <errno.h> 4#include <errno.h>
5#include <iostream> 5#include <iostream>
6#include <fstream> 6#include <fstream>
7#include <stdexcept> 7#include <stdexcept>
8using namespace std; 8using namespace std;
9#include "configuration.h" 9#include "configuration.h"
10#include "util.h" 10#include "util.h"
11 11
12#include "config.h" 12#include "config.h"
13#ifdef HAVE_GETOPT_H 13#ifdef HAVE_GETOPT_H
14# include <getopt.h> 14# include <getopt.h>
15#endif 15#endif
16 16
17#ifndef DEFAULT_CONF_FILE 17#ifndef DEFAULT_CONF_FILE
18# define DEFAULT_CONF_FILE "/etc/dudki.conf" 18# define DEFAULT_CONF_FILE "/etc/dudki.conf"
19#endif 19#endif
20 20
21#define PHEADER PACKAGE " Version " VERSION 21#define PHEADER PACKAGE " Version " VERSION
22#define PCOPY "Copyright (c) 2004 Klever Group" 22#define PCOPY "Copyright (c) 2004-2006 Klever Group"
23 23
24bool finishing = false; 24bool finishing = false;
25bool restarting = false; 25bool restarting = false;
26static char **_argv = NULL; 26static char **_argv = NULL;
27 27
28static void lethal_signal_handler(int signum) { 28static void lethal_signal_handler(int signum) {
29 syslog(LOG_NOTICE,"Lethal signal received. Terminating."); 29 syslog(LOG_NOTICE,"Lethal signal received. Terminating.");
30 finishing = true; 30 finishing = true;
31} 31}
32static void sighup_handler(int signum) { 32static void sighup_handler(int signum) {
33 syslog(LOG_NOTICE,"SUGHUP received, reloading."); 33 syslog(LOG_NOTICE,"SUGHUP received, reloading.");
34 restarting = finishing = true; 34 restarting = finishing = true;
35} 35}
36 36
37void check_herd(configuration& config) { 37void check_herd(configuration& config) {
38 process::prepare_herd(); 38 process::prepare_herd();
39 for(processes_t::iterator i=config.processes.begin();i!=config.processes.end();++i) 39 for(processes_t::iterator i=config.processes.begin();i!=config.processes.end();++i)
40 i->second.check(i->first,config); 40 i->second.check(i->first,config);
41 process::unprepare_herd(); 41 process::unprepare_herd();
42} 42}
43 43
44void signal_self(const configuration& config,int signum) { 44void signal_self(const configuration& config,int signum) {
45 ifstream pids(config.pidfile.c_str(),ios::in); 45 ifstream pids(config.pidfile.c_str(),ios::in);
46 if(!pids) 46 if(!pids)