-rw-r--r-- | src/dudki.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dudki.cc b/src/dudki.cc index c966695..3af5372 100644 --- a/src/dudki.cc +++ b/src/dudki.cc @@ -229,22 +229,21 @@ int main(int argc,char **argv) { }catch(exception& e) { cerr << "dudki(" << argv[narg] << "): " << e.what() << endl; failures++; } } if(failures) throw runtime_error("not all processes have been successfully signaled"); } - if(!op_signum) - exit(0); + exit(0); }catch(exception& e) { - if(!op_signum) - exit(1); + exit(1); } + break; case op_ensure: try { signal_self(config,0); break; }catch(exception& e) { syslog(LOG_NOTICE,"The dudki process is down, taking its place"); config.daemonize = true; }catch(int zero) { @@ -284,9 +283,10 @@ int main(int argc,char **argv) { break; default: throw runtime_error(string(__PRETTY_FUNCTION__)+": internal error"); } }catch(exception& e) { cerr << "Oops: " << e.what() << endl; return 1; } + exit(0); } |