From 04dae325092896597293dedb04a89e7d0c4175b4 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 27 Nov 2014 21:32:34 +0900 Subject: [PATCH] nghttpx: Store PID to Config again after daemon() --- src/shrpx.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shrpx.cc b/src/shrpx.cc index 3717a18b..88fe7984 100644 --- a/src/shrpx.cc +++ b/src/shrpx.cc @@ -513,6 +513,9 @@ int event_loop() LOG(FATAL) << "Failed to daemonize: " << strerror(error); exit(EXIT_FAILURE); } + + // We get new PID after successful daemon(). + mod_config()->pid = getpid(); } if(get_config()->pid_file) {