nghttpx: Use cached get_config()->pid in save_pid()

This commit is contained in:
Tatsuhiro Tsujikawa 2014-11-27 22:41:14 +09:00
parent 5d59adc52b
commit c67ccad74d
1 changed files with 1 additions and 1 deletions

View File

@ -309,7 +309,7 @@ namespace {
void save_pid() void save_pid()
{ {
std::ofstream out(get_config()->pid_file.get(), std::ios::binary); std::ofstream out(get_config()->pid_file.get(), std::ios::binary);
out << getpid() << "\n"; out << get_config()->pid << "\n";
out.close(); out.close();
if(!out) { if(!out) {
LOG(ERROR) << "Could not save PID to file " LOG(ERROR) << "Could not save PID to file "