Skip to content

Commit

Permalink
Now daemonizing after the configuration rather than before so that mo…
Browse files Browse the repository at this point in the history
…re errors are caught on the command line rather than via an ASYNC process
  • Loading branch information
John Sharratt authored and John Sharratt committed Jul 1, 2017
1 parent 55ad4b1 commit 2f10118
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ndppd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ int main(int argc, char* argv[], char* env[])
if (cf.is_null())
return -1;

if (!configure(cf))
return -1;

if (daemon) {
logger::syslog(true);

Expand All @@ -280,9 +283,6 @@ int main(int argc, char* argv[], char* env[])
}
}

if (!configure(cf))
return -1;

if (!pidfile.empty()) {
std::ofstream pf;
pf.open(pidfile.c_str(), std::ios::out | std::ios::trunc);
Expand Down

0 comments on commit 2f10118

Please sign in to comment.