summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2004-08-01 19:31:38 (UTC)
committer Michael Krelin <hacker@klever.net>2004-08-01 19:31:38 (UTC)
commit5cb38f4c865b62e45b70e6bf2e16ca6c3909e599 (patch) (side-by-side diff)
tree2556986b34054df0e54fb130b289638cca6175ab
parent01aa1814c01211e6423540aa40433e469c65952b (diff)
downloaddudki-5cb38f4c865b62e45b70e6bf2e16ca6c3909e599.zip
dudki-5cb38f4c865b62e45b70e6bf2e16ca6c3909e599.tar.gz
dudki-5cb38f4c865b62e45b70e6bf2e16ca6c3909e599.tar.bz2
-r no longer acts as -e
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--src/dudki.cc8
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
@@ -225,30 +225,29 @@ int main(int argc,char **argv) {
if(op_signum)
i->second.signal(op_signum);
else
i->second.check();
}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) {
// we throw zero in case we're ensuring that this very process is running.
// we don't have to daemonize if we're daemonic.
config.daemonize = false;
}
@@ -280,13 +279,14 @@ int main(int argc,char **argv) {
}
if(restarting)
execvp(_argv[0],_argv);
}
break;
default:
throw runtime_error(string(__PRETTY_FUNCTION__)+": internal error");
}
}catch(exception& e) {
cerr << "Oops: " << e.what() << endl;
return 1;
}
+ exit(0);
}