Fix issue #2 - ndppd dæmonizes too early
This commit is contained in:
parent
24aeceb060
commit
00da8bf7ba
18
src/ndppd.cc
18
src/ndppd.cc
@ -201,15 +201,6 @@ int main(int argc, char* argv[], char* env[])
|
||||
}
|
||||
}
|
||||
|
||||
if (daemon) {
|
||||
logger::syslog(true);
|
||||
|
||||
if (daemonize() < 0) {
|
||||
logger::error() << "Failed to daemonize process";
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!pidfile.empty()) {
|
||||
std::ofstream pf;
|
||||
pf.open(pidfile.c_str(), std::ios::out | std::ios::trunc);
|
||||
@ -226,7 +217,14 @@ int main(int argc, char* argv[], char* env[])
|
||||
if (!configure(config_path))
|
||||
return -1;
|
||||
|
||||
//route::load("/proc/net/ipv6_route");
|
||||
if (daemon) {
|
||||
logger::syslog(true);
|
||||
|
||||
if (daemonize() < 0) {
|
||||
logger::error() << "Failed to daemonize process";
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Time stuff.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user