Commit 6680d8b7 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Call setsid after executing new binary

parent 0b32df94
...@@ -249,6 +249,12 @@ void exec_binary(SignalServer *ssv) { ...@@ -249,6 +249,12 @@ void exec_binary(SignalServer *ssv) {
shrpx_signal_unset_master_proc_ign_handler(); shrpx_signal_unset_master_proc_ign_handler();
rv = shrpx_signal_unblock_all(); rv = shrpx_signal_unblock_all();
if (setsid() == -1) {
auto error = errno;
LOG(ERROR) << "setsid() failed: " << strerror(error);
}
if (rv != 0) { if (rv != 0) {
auto error = errno; auto error = errno;
LOG(ERROR) << "Unblocking all signals failed: " << strerror(error); LOG(ERROR) << "Unblocking all signals failed: " << strerror(error);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment