nghttpx: Store PID to Config again after daemon()

This commit is contained in:
Tatsuhiro Tsujikawa 2014-11-27 21:32:34 +09:00
parent 3e0813d407
commit 04dae32509
1 changed files with 3 additions and 0 deletions

View File

@ -513,6 +513,9 @@ int event_loop()
LOG(FATAL) << "Failed to daemonize: " << strerror(error); LOG(FATAL) << "Failed to daemonize: " << strerror(error);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
// We get new PID after successful daemon().
mod_config()->pid = getpid();
} }
if(get_config()->pid_file) { if(get_config()->pid_file) {