From 2f10118a5c8976021fd27496bc60f431b9154af6 Mon Sep 17 00:00:00 2001 From: John Sharratt Date: Sat, 1 Jul 2017 13:09:46 +0200 Subject: [PATCH] Now daemonizing after the configuration rather than before so that more errors are caught on the command line rather than via an ASYNC process --- src/ndppd.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ndppd.cc b/src/ndppd.cc index 80dc6d4..1bd35b6 100644 --- a/src/ndppd.cc +++ b/src/ndppd.cc @@ -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); @@ -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);