Allow repeated calling of Config::activate

This commit is contained in:
ozzay 2014-08-18 13:10:26 +02:00
parent 5784e0eb32
commit 4f3f67d23f

View file

@ -419,6 +419,7 @@ int Util::Config::serveForkedSocket(int (*callback)(Socket::Connection & S)) {
void Util::Config::activate() {
if (vals.isMember("username")) {
setUser(getString("username"));
vals.removeMember("username");
}
if (vals.isMember("daemonize") && getBool("daemonize")) {
if (vals.isMember("logfile") && getString("logfile") != "") {
@ -426,6 +427,7 @@ void Util::Config::activate() {
} else {
Daemonize(false);
}
vals.removeMember("daemonize");
}
struct sigaction new_action;
struct sigaction cur_action;