-rw-r--r-- | src/dudki.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/dudki.cc b/src/dudki.cc index 9562079..c966695 100644 --- a/src/dudki.cc +++ b/src/dudki.cc | |||
@@ -36,6 +36,8 @@ static void sighup_handler(int signum) { | |||
36 | 36 | ||
37 | void check_herd(configuration& config) { | 37 | void check_herd(configuration& config) { |
38 | process::prepare_herd(); | ||
38 | 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) |
39 | i->second.check(i->first,config); | 40 | i->second.check(i->first,config); |
41 | process::unprepare_herd(); | ||
40 | } | 42 | } |
41 | 43 | ||
@@ -221,5 +223,8 @@ int main(int argc,char **argv) { | |||
221 | if(i==config.processes.end()) | 223 | if(i==config.processes.end()) |
222 | throw runtime_error("no such process configured"); | 224 | throw runtime_error("no such process configured"); |
223 | i->second.signal(op_signum); | 225 | if(op_signum) |
226 | i->second.signal(op_signum); | ||
227 | else | ||
228 | i->second.check(); | ||
224 | }catch(exception& e) { | 229 | }catch(exception& e) { |
225 | cerr << "dudki(" << argv[narg] << "): " << e.what() << endl; | 230 | cerr << "dudki(" << argv[narg] << "): " << e.what() << endl; |